ZoomModule()

Zooms the content of the UI module and resets the position of the panel in the module.

Synopsis

void ZoomModule(string module, float factor, int x, int y);

Parameters

Parameter Description
modules Name of the module
factor Factor to zoom by
x x position of the panel in the module
y y position of the panel in the module

Return value

None

Description

The function zooms the module module in or out by the specified factor. If no module name is indicated, the module (myModuleName()) is used. If the factor specified is 0.0, the set zoom factor is retained, only the panel is moved.

If a zoom factor greater than 1 is used the position of the panel is moved to the 0.0 coordinate within the module.

First you need to enter visionResizeMode = "Zoom" in the config file in the [ui] section.

By default only a zoom from the range 0.5--4.0 is accepted, and the minimum/maximum possible values can be changed by the [ui] minZoomFactor/[ui] maxZoomFactor config entries.

Example

main()
{
  ZoomModule("", 1.33, 500, 500); // Zooms the module by a
  // factor of 1.33 and resets the position of the panel in
  // the module
}

Assignment

panel.ctl

Availability

UI