Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.




Introduced in

Version:3.9.1

Description

Description:Creates a Coordinates Dialog in VBS VBS3 that can be used to select a position in various coordinate systems.

Syntax

Syntax:call fn_vbs_coordinatesDialog [display, coordPos, coordType, buttonCode, buttonCodeArg, titleText, buttonText]
Parameters:
  • display: Display - Parent display or displayNull. if no dialog is active.
  • coordPos: Position-2 - A VBS ASL2 position (with VBS_CD_coordPos, you can use the coordinates that the user selected previously, when the Coordinates Dialog was opened in the same VBS instance. If this value does not exist, the dialog fields remain be empty).
  • coordType: String - Type of coordinates that should be selected / shown in the created dialog. With VBS_CD_coordType, you can use the coordinates type that the user selected previously, when the Coordinates Dialog was opened in the same VBS instance. If this value does not exist, the current coordinate system is used (optional, the default value is selected based on the current coordinate system (getGeoCoordSystem)).
  • buttonCode: Code - The code to execute when the OK button is clicked (optional, default: nil). These variables from missionNamespace can be used (for example, missionNamespace getVariable "VBS_CD_coordPos"):
    • VBS_CD_coordPos - A VBS ASL2 position of the coordinates entered in the Coordinates Dialog.
    • VBS_CD_coordType - The selected coordinates-system type in the Coordinates Dialog.
    • VBS_CD_coordString - A human-readable string of the current coordinates from the Coordinates Dialog.
  • buttonCodeArg: Anything - The argument passed to buttonCode as _this.
  • titleText: String - The dialog title text to display (optional, default: "Set Coordinates").
  • buttonText: String - The text to display for the OK button (optional, default: "OK").
Return Value:Nothing

Warning

When using functions in VBS versions older than 3.4, certain limitations and requirements should be kept in mind - the main ones being that capitalization of the function name is crucial, and that #include "\vbs2\headers\function_library.hpp" has to be included in every script that utilizes it. More Functions A-Z.

Examples

Examples:
[findDisplay 137, [50,50,60], "MGRS", nil, nil, "Set Coordinates - My title", "OK (CUST)"] call fn_vbs_coordinatesDialog;

Additional Information

See also: fn vbs posToCoordString
Multiplayer: 
Problems: 

Notes