@paulbarmstrong/js-to-sqf 0.1.0-alpha → 0.1.2-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +442 -12
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -58,6 +58,28 @@ declare class Control {}
|
|
|
58
58
|
*/
|
|
59
59
|
declare class DiaryRecord {}
|
|
60
60
|
|
|
61
|
+
/**
|
|
62
|
+
* A location is an extended type of marker. For example city names displayed on
|
|
63
|
+
* the map are locations; their information can be accessed and modified with
|
|
64
|
+
* Location commands.
|
|
65
|
+
* @see {@link https://community.bistudio.com/wiki/Location}
|
|
66
|
+
*/
|
|
67
|
+
declare class Location {}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* A Task is a Data Type that contains a task's details, such as location, title
|
|
71
|
+
* and description.
|
|
72
|
+
* @see {@link https://community.bistudio.com/wiki/Task}
|
|
73
|
+
*/
|
|
74
|
+
declare class Task {}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* A Script Handle, used to identify scripts in script operations called using
|
|
78
|
+
* spawn or execVM.
|
|
79
|
+
* @see {@link https://community.bistudio.com/wiki/Script_Handle}
|
|
80
|
+
*/
|
|
81
|
+
declare class ScriptHandle {}
|
|
82
|
+
|
|
61
83
|
/**
|
|
62
84
|
* Data type representing a side.
|
|
63
85
|
* @see {@link https://community.bistudio.com/wiki/Side}
|
|
@@ -739,7 +761,7 @@ export function addEditorObject(map: Control, typeNameSubtypeConfig: Array<any>)
|
|
|
739
761
|
* @see {@link https://community.bistudio.com/wiki/addEventHandler}
|
|
740
762
|
* @sqfsyntaxtype binary
|
|
741
763
|
*/
|
|
742
|
-
export function addEventHandler(target: GameObject | Group, type: string, code: Function
|
|
764
|
+
export function addEventHandler(target: GameObject | Group, type: string, code: Function): number
|
|
743
765
|
|
|
744
766
|
/**
|
|
745
767
|
* Applies given force for one frame (essentially an impulse) to unit or given
|
|
@@ -1585,6 +1607,28 @@ export function configFile(): ConfigFile
|
|
|
1585
1607
|
*/
|
|
1586
1608
|
export function configName(config: Config): string
|
|
1587
1609
|
|
|
1610
|
+
/**
|
|
1611
|
+
* A non-existing Config. ⚠Unlike other null values (objNull, grpNull, etc),
|
|
1612
|
+
* configNull returns true when compared to itself. configNull == configNull; //
|
|
1613
|
+
* returns true isNull configNull; // returns true configNull isEqualTo configNull;
|
|
1614
|
+
* // returns true configNull == configFile >> "ANonExistentEntry"; // returns true
|
|
1615
|
+
*
|
|
1616
|
+
* @returns Config
|
|
1617
|
+
* @see {@link https://community.bistudio.com/wiki/configNull}
|
|
1618
|
+
* @sqfsyntaxtype nullary
|
|
1619
|
+
*/
|
|
1620
|
+
export function configNull(): Config
|
|
1621
|
+
|
|
1622
|
+
/**
|
|
1623
|
+
* A non-existing Control. To compare non-existent objects use isNull or isEqualTo
|
|
1624
|
+
* (see examples).
|
|
1625
|
+
*
|
|
1626
|
+
* @returns Control
|
|
1627
|
+
* @see {@link https://community.bistudio.com/wiki/controlNull}
|
|
1628
|
+
* @sqfsyntaxtype nullary
|
|
1629
|
+
*/
|
|
1630
|
+
export function controlNull(): Control
|
|
1631
|
+
|
|
1588
1632
|
/**
|
|
1589
1633
|
* Copies ANSI text string to the clipboard. If Unicode support is desired, see
|
|
1590
1634
|
* forceUnicode.
|
|
@@ -2217,6 +2261,23 @@ export function detach(object: GameObject): void
|
|
|
2217
2261
|
*/
|
|
2218
2262
|
export function diag_log(output: any): void
|
|
2219
2263
|
|
|
2264
|
+
/**
|
|
2265
|
+
* A non-existent Diary Record. To compare non-existent objects use isNull or
|
|
2266
|
+
* isEqualTo: diaryRecordNull == diaryRecordNull; // false isNull diaryRecordNull;
|
|
2267
|
+
* // true diaryRecordNull isEqualTo diaryRecordNull; // true ⓘBefore Arma 3 v2.00,
|
|
2268
|
+
* isNull did not work with the diary record type and diaryRecordNull did not
|
|
2269
|
+
* exist. In order to verify a null record, it is possible to create a variable and
|
|
2270
|
+
* compare against it: private _diaryRecordNull = objNull createDiaryRecord [];
|
|
2271
|
+
* private _createdRecord = player createDiaryRecord ["Diary", ["Title",
|
|
2272
|
+
* "Description"]]; if (_createdRecord isEqualTo _diaryRecordNull) then { hint
|
|
2273
|
+
* "Failed"; };
|
|
2274
|
+
*
|
|
2275
|
+
* @returns DiaryRecord
|
|
2276
|
+
* @see {@link https://community.bistudio.com/wiki/diaryRecordNull}
|
|
2277
|
+
* @sqfsyntaxtype nullary
|
|
2278
|
+
*/
|
|
2279
|
+
export function diaryRecordNull(): DiaryRecord
|
|
2280
|
+
|
|
2220
2281
|
/**
|
|
2221
2282
|
* Adds an event handler to the given display. See User Interface Event Handlers
|
|
2222
2283
|
* for the full list of event names. If applicable, see DIK_KeyCodes for a list of
|
|
@@ -2257,6 +2318,17 @@ export function displayCtrl(display: Display, idc: number): Control
|
|
|
2257
2318
|
*/
|
|
2258
2319
|
export function displayCtrlV2(idc: number): Control
|
|
2259
2320
|
|
|
2321
|
+
/**
|
|
2322
|
+
* A non-existing Display. To compare non-existent displays use isNull or
|
|
2323
|
+
* isEqualTo: displayNull == displayNull; // false isNull displayNull; // true
|
|
2324
|
+
* displayNull isEqualTo displayNull; // true
|
|
2325
|
+
*
|
|
2326
|
+
* @returns Display
|
|
2327
|
+
* @see {@link https://community.bistudio.com/wiki/displayNull}
|
|
2328
|
+
* @sqfsyntaxtype nullary
|
|
2329
|
+
*/
|
|
2330
|
+
export function displayNull(): Display
|
|
2331
|
+
|
|
2260
2332
|
/**
|
|
2261
2333
|
* Remove a given event handler from the given display.
|
|
2262
2334
|
*
|
|
@@ -2289,7 +2361,7 @@ export function distance(param1: GameObject | PositionAGL | Position2D, param2:
|
|
|
2289
2361
|
* @see {@link https://community.bistudio.com/wiki/distance}
|
|
2290
2362
|
* @sqfsyntaxtype binary
|
|
2291
2363
|
*/
|
|
2292
|
-
export function distanceV2(location1:
|
|
2364
|
+
export function distanceV2(location1: Location | PositionAGL | Position2D, location2: Location | PositionAGL | Position2D): number
|
|
2293
2365
|
|
|
2294
2366
|
/**
|
|
2295
2367
|
* Returns a distance in meters between Objects, Positions or Locations. ⚠If
|
|
@@ -2751,7 +2823,7 @@ export function getPos(object: GameObject): PositionAGLS
|
|
|
2751
2823
|
* @see {@link https://community.bistudio.com/wiki/getPos}
|
|
2752
2824
|
* @sqfsyntaxtype unary
|
|
2753
2825
|
*/
|
|
2754
|
-
export function getPosV2(location:
|
|
2826
|
+
export function getPosV2(location: Location): PositionAGL
|
|
2755
2827
|
|
|
2756
2828
|
/**
|
|
2757
2829
|
* Returns object or location position. If the argument is an object, the return
|
|
@@ -3342,6 +3414,17 @@ export function local(object: GameObject | Group): boolean
|
|
|
3342
3414
|
*/
|
|
3343
3415
|
export function localNamespace(): Namespace
|
|
3344
3416
|
|
|
3417
|
+
/**
|
|
3418
|
+
* A non-existing Location. To compare non-existent locations use isNull or
|
|
3419
|
+
* isEqualTo: locationNull == locationNull; // false isNull locationNull; // true
|
|
3420
|
+
* locationNull isEqualTo locationNull; // true
|
|
3421
|
+
*
|
|
3422
|
+
* @returns Location
|
|
3423
|
+
* @see {@link https://community.bistudio.com/wiki/locationNull}
|
|
3424
|
+
* @sqfsyntaxtype nullary
|
|
3425
|
+
*/
|
|
3426
|
+
export function locationNull(): Location
|
|
3427
|
+
|
|
3345
3428
|
/**
|
|
3346
3429
|
* Lock vehicle (disable mounting / dismounting) for player. This command will
|
|
3347
3430
|
* remove user get in/get out actions but will not stop player getting into or out
|
|
@@ -3527,7 +3610,7 @@ export function name(object: GameObject): string
|
|
|
3527
3610
|
* @see {@link https://community.bistudio.com/wiki/name}
|
|
3528
3611
|
* @sqfsyntaxtype unary
|
|
3529
3612
|
*/
|
|
3530
|
-
export function nameV2(location:
|
|
3613
|
+
export function nameV2(location: Location): string
|
|
3531
3614
|
|
|
3532
3615
|
/**
|
|
3533
3616
|
* When argument is Object, the command returns the name given to a unit using the
|
|
@@ -3553,7 +3636,7 @@ export function nameV3(namespace: Namespace): string
|
|
|
3553
3636
|
* @see {@link https://community.bistudio.com/wiki/name}
|
|
3554
3637
|
* @sqfsyntaxtype unary
|
|
3555
3638
|
*/
|
|
3556
|
-
export function nameV4(scriptHandle:
|
|
3639
|
+
export function nameV4(scriptHandle: ScriptHandle): string
|
|
3557
3640
|
|
|
3558
3641
|
/**
|
|
3559
3642
|
* Returns the nearest object of given type (or inherited classes) to given
|
|
@@ -3766,7 +3849,7 @@ export function position(object: GameObject): PositionAGLS
|
|
|
3766
3849
|
* @see {@link https://community.bistudio.com/wiki/position}
|
|
3767
3850
|
* @sqfsyntaxtype unary
|
|
3768
3851
|
*/
|
|
3769
|
-
export function positionV2(location:
|
|
3852
|
+
export function positionV2(location: Location): PositionAGL
|
|
3770
3853
|
|
|
3771
3854
|
/**
|
|
3772
3855
|
* Returns the global namespace attached to the active user profile. Use
|
|
@@ -3992,6 +4075,18 @@ export function screenToWorld(screen: Position2D): PositionAGL
|
|
|
3992
4075
|
*/
|
|
3993
4076
|
export function screenToWorldV2(camera: GameObject, screen: Position2D): PositionAGL
|
|
3994
4077
|
|
|
4078
|
+
/**
|
|
4079
|
+
* A non-existing or completed Script Handle. To compare non-existent scripts use
|
|
4080
|
+
* isNull or isEqualTo: scriptNull == scriptNull; // ERROR! == cannot be used with
|
|
4081
|
+
* script object isNull scriptNull; // true scriptNull isEqualTo scriptNull; //
|
|
4082
|
+
* true
|
|
4083
|
+
*
|
|
4084
|
+
* @returns NULL script
|
|
4085
|
+
* @see {@link https://community.bistudio.com/wiki/scriptNull}
|
|
4086
|
+
* @sqfsyntaxtype nullary
|
|
4087
|
+
*/
|
|
4088
|
+
export function scriptNull(): ScriptHandle
|
|
4089
|
+
|
|
3995
4090
|
/**
|
|
3996
4091
|
* Returns server's namespace. This namespace is only available on the server for
|
|
3997
4092
|
* the server's uptime duration (same as uiNamespace). All server event handlers,
|
|
@@ -4423,7 +4518,7 @@ export function setWaypointType(waypoint: Waypoint, type: string): void
|
|
|
4423
4518
|
* @see {@link https://community.bistudio.com/wiki/side}
|
|
4424
4519
|
* @sqfsyntaxtype unary
|
|
4425
4520
|
*/
|
|
4426
|
-
export function side(target: any): Side
|
|
4521
|
+
export function side(target: any | Location): Side
|
|
4427
4522
|
|
|
4428
4523
|
/**
|
|
4429
4524
|
* Types text to the side radio channel by the specified unit. Use clearRadio to
|
|
@@ -4453,6 +4548,25 @@ export function sideChat(unit: GameObject, chatText: string): void
|
|
|
4453
4548
|
*/
|
|
4454
4549
|
export function sideChatV2(side: Side, identity: string, chatText: string): void
|
|
4455
4550
|
|
|
4551
|
+
/**
|
|
4552
|
+
* Returns empty side, for example static buildings in Eden Editor.
|
|
4553
|
+
*
|
|
4554
|
+
* @returns Side
|
|
4555
|
+
* @see {@link https://community.bistudio.com/wiki/sideEmpty}
|
|
4556
|
+
* @sqfsyntaxtype nullary
|
|
4557
|
+
*/
|
|
4558
|
+
export function sideEmpty(): Side
|
|
4559
|
+
|
|
4560
|
+
/**
|
|
4561
|
+
* The unknown side. Used when the side of a unit is unknown, e.g. for spotted
|
|
4562
|
+
* targets with insufficient information.
|
|
4563
|
+
*
|
|
4564
|
+
* @returns Side
|
|
4565
|
+
* @see {@link https://community.bistudio.com/wiki/sideUnknown}
|
|
4566
|
+
* @sqfsyntaxtype nullary
|
|
4567
|
+
*/
|
|
4568
|
+
export function sideUnknown(): Side
|
|
4569
|
+
|
|
4456
4570
|
/**
|
|
4457
4571
|
* Suspends code execution for given time in seconds. The sleep precision is given
|
|
4458
4572
|
* by a framerate, the delay given is the minimal delay expected. Must be called
|
|
@@ -4499,7 +4613,7 @@ export function sort(array: Array<any>, order: boolean): void
|
|
|
4499
4613
|
* @see {@link https://community.bistudio.com/wiki/spawn}
|
|
4500
4614
|
* @sqfsyntaxtype binary
|
|
4501
4615
|
*/
|
|
4502
|
-
export function spawn(arguments: Array<any>, code: Function):
|
|
4616
|
+
export function spawn(arguments: Array<any>, code: Function): ScriptHandle
|
|
4503
4617
|
|
|
4504
4618
|
/**
|
|
4505
4619
|
* Adds given set of compiled instructions to the scheduler. Exactly when the code
|
|
@@ -4518,7 +4632,7 @@ export function spawn(arguments: Array<any>, code: Function): any
|
|
|
4518
4632
|
* @see {@link https://community.bistudio.com/wiki/spawn}
|
|
4519
4633
|
* @sqfsyntaxtype unary
|
|
4520
4634
|
*/
|
|
4521
|
-
export function spawnV2(code: Function):
|
|
4635
|
+
export function spawnV2(code: Function): ScriptHandle
|
|
4522
4636
|
|
|
4523
4637
|
/**
|
|
4524
4638
|
* Adds given set of compiled instructions to the scheduler. Exactly when the code
|
|
@@ -4538,7 +4652,7 @@ export function spawnV2(code: Function): any
|
|
|
4538
4652
|
* @see {@link https://community.bistudio.com/wiki/spawn}
|
|
4539
4653
|
* @sqfsyntaxtype unary
|
|
4540
4654
|
*/
|
|
4541
|
-
export function spawnV3(name: string):
|
|
4655
|
+
export function spawnV3(name: string): ScriptHandle
|
|
4542
4656
|
|
|
4543
4657
|
/**
|
|
4544
4658
|
* Converts any value into a string, depending on its type. If an Object has a
|
|
@@ -4562,6 +4676,58 @@ export function str(value: any): string
|
|
|
4562
4676
|
*/
|
|
4563
4677
|
export function systemChat(text: string): void
|
|
4564
4678
|
|
|
4679
|
+
/**
|
|
4680
|
+
* A non-existing Task. To compare non-existent tasks use isNull or isEqualTo:
|
|
4681
|
+
* taskNull == taskNull; // false isNull taskNull; // true taskNull isEqualTo
|
|
4682
|
+
* taskNull; // true
|
|
4683
|
+
*
|
|
4684
|
+
* @returns Task
|
|
4685
|
+
* @see {@link https://community.bistudio.com/wiki/taskNull}
|
|
4686
|
+
* @sqfsyntaxtype nullary
|
|
4687
|
+
*/
|
|
4688
|
+
export function taskNull(): Task
|
|
4689
|
+
|
|
4690
|
+
/**
|
|
4691
|
+
* A non-existent Team Member. To compare non-existent team members use isNull or
|
|
4692
|
+
* isEqualTo: teamMemberNull == teamMemberNull; // false isNull teamMemberNull; //
|
|
4693
|
+
* true teamMemberNull isEqualTo teamMemberNull; // true
|
|
4694
|
+
*
|
|
4695
|
+
* @returns TeamMember
|
|
4696
|
+
* @see {@link https://community.bistudio.com/wiki/teamMemberNull}
|
|
4697
|
+
* @sqfsyntaxtype nullary
|
|
4698
|
+
*/
|
|
4699
|
+
export function teamMemberNull(): TeamMember
|
|
4700
|
+
|
|
4701
|
+
/**
|
|
4702
|
+
* Returns the Data Type of an expression. The type is returned as on of the
|
|
4703
|
+
* following all-uppercase strings:
|
|
4704
|
+
* • "ARRAY"
|
|
4705
|
+
* • "BOOL"
|
|
4706
|
+
* • "CODE"
|
|
4707
|
+
* • "CONFIG"
|
|
4708
|
+
* • "CONTROL"
|
|
4709
|
+
* • "DISPLAY"
|
|
4710
|
+
* • "GROUP"
|
|
4711
|
+
* • "OBJECT"
|
|
4712
|
+
* • "SCALAR" (and "NaN")
|
|
4713
|
+
* • "SCRIPT"
|
|
4714
|
+
* • "SIDE"
|
|
4715
|
+
* • "STRING"
|
|
4716
|
+
* • "TEXT"
|
|
4717
|
+
* • 1.08 "LOCATION"
|
|
4718
|
+
* • 1.00 "TEAM_MEMBER"
|
|
4719
|
+
* • 1.00 "NAMESPACE"
|
|
4720
|
+
* • 1.00 "DIARY_RECORD"
|
|
4721
|
+
* • 1.00 "TASK"
|
|
4722
|
+
* • 2.02 "HASHMAP" They represent the available Data Types in Arma. For type
|
|
4723
|
+
* comparison, use isEqualType command instead.
|
|
4724
|
+
*
|
|
4725
|
+
* @returns string
|
|
4726
|
+
* @see {@link https://community.bistudio.com/wiki/typeName}
|
|
4727
|
+
* @sqfsyntaxtype unary
|
|
4728
|
+
*/
|
|
4729
|
+
export function typeName(anything: any): string
|
|
4730
|
+
|
|
4565
4731
|
/**
|
|
4566
4732
|
* Returns the class name of given target.
|
|
4567
4733
|
*
|
|
@@ -4719,7 +4885,7 @@ export function waitUntilV2(condition: Function, timeout: number, interval?: num
|
|
|
4719
4885
|
* @see {@link https://community.bistudio.com/wiki/waitUntil}
|
|
4720
4886
|
* @sqfsyntaxtype unary
|
|
4721
4887
|
*/
|
|
4722
|
-
export function waitUntilV3(scriptHandle:
|
|
4888
|
+
export function waitUntilV3(scriptHandle: ScriptHandle): any
|
|
4723
4889
|
|
|
4724
4890
|
/**
|
|
4725
4891
|
* Suspends execution of scheduled script until the given condition satisfied.
|
|
@@ -4742,7 +4908,7 @@ export function waitUntilV3(scriptHandle: any): any
|
|
|
4742
4908
|
* @see {@link https://community.bistudio.com/wiki/waitUntil}
|
|
4743
4909
|
* @sqfsyntaxtype unary
|
|
4744
4910
|
*/
|
|
4745
|
-
export function waitUntilV4(scriptHandle:
|
|
4911
|
+
export function waitUntilV4(scriptHandle: ScriptHandle, timeout: number): any
|
|
4746
4912
|
|
|
4747
4913
|
/**
|
|
4748
4914
|
* Get provided waypoint's position.
|
|
@@ -4780,6 +4946,270 @@ export function weaponsTurret(vehicle: GameObject, turretPath: TurretPath): Arra
|
|
|
4780
4946
|
*/
|
|
4781
4947
|
export function west(): Side
|
|
4782
4948
|
|
|
4949
|
+
/**
|
|
4950
|
+
* Add an event handler to the given control. ⚠
|
|
4951
|
+
* • Control event handlers are processed in reversed order, i.e. last added:
|
|
4952
|
+
* first, first added: last. So if you have an override it should be set up in the
|
|
4953
|
+
* 1st added EH.
|
|
4954
|
+
* • When using the event names listed here with the ctrlAddEventHandler,
|
|
4955
|
+
* ctrlSetEventHandler, displayAddEventHandler or displaySetEventHandler commands,
|
|
4956
|
+
* the prefix "on" in the event name must be removed (e.g. 'ButtonDown' instead of
|
|
4957
|
+
* 'onButtonDown').
|
|
4958
|
+
*
|
|
4959
|
+
* @param handler - event handler name (without the "on" prefix)
|
|
4960
|
+
* @param code - code to execute when the event fires
|
|
4961
|
+
* @returns handler ID or -1 if failed
|
|
4962
|
+
* @see {@link https://community.bistudio.com/wiki/ctrlAddEventHandler}
|
|
4963
|
+
* @sqfsyntaxtype binary
|
|
4964
|
+
*/
|
|
4965
|
+
export function ctrlAddEventHandler(control: Control, handler: string, code: Function): number
|
|
4966
|
+
|
|
4967
|
+
/**
|
|
4968
|
+
* Enables or disables a control of the currently active user dialog. Disabled
|
|
4969
|
+
* controls cannot be clicked onto. Read Arma: GUI Configuration for more
|
|
4970
|
+
* information about user dialogs and controls.
|
|
4971
|
+
*
|
|
4972
|
+
* @param idc - control IDC
|
|
4973
|
+
* @param enable - true to enable the control, false to disable it
|
|
4974
|
+
* @see {@link https://community.bistudio.com/wiki/ctrlEnable}
|
|
4975
|
+
* @sqfsyntaxtype unary
|
|
4976
|
+
*/
|
|
4977
|
+
export function ctrlEnable(idc: number, enable: boolean): void
|
|
4978
|
+
|
|
4979
|
+
/**
|
|
4980
|
+
* Enables or disables a control of the currently active user dialog. Disabled
|
|
4981
|
+
* controls cannot be clicked onto. Read Arma: GUI Configuration for more
|
|
4982
|
+
* information about user dialogs and controls.
|
|
4983
|
+
*
|
|
4984
|
+
* @see {@link https://community.bistudio.com/wiki/ctrlEnable}
|
|
4985
|
+
* @sqfsyntaxtype binary
|
|
4986
|
+
*/
|
|
4987
|
+
export function ctrlEnableV2(controlName: Control, enable: boolean): void
|
|
4988
|
+
|
|
4989
|
+
/**
|
|
4990
|
+
* Returns if a control on the currently active user dialog is enabled. Disabled
|
|
4991
|
+
* controls cannot be focused. Read Arma: GUI Configuration for more information
|
|
4992
|
+
* about user dialogs and controls.
|
|
4993
|
+
*
|
|
4994
|
+
* @param idc - control's IDC
|
|
4995
|
+
* @returns true if the control is enabled, false if not
|
|
4996
|
+
* @see {@link https://community.bistudio.com/wiki/ctrlEnabled}
|
|
4997
|
+
* @sqfsyntaxtype unary
|
|
4998
|
+
*/
|
|
4999
|
+
export function ctrlEnabled(idc: number): boolean
|
|
5000
|
+
|
|
5001
|
+
/**
|
|
5002
|
+
* Returns if a control on the currently active user dialog is enabled. Disabled
|
|
5003
|
+
* controls cannot be focused. Read Arma: GUI Configuration for more information
|
|
5004
|
+
* about user dialogs and controls.
|
|
5005
|
+
*
|
|
5006
|
+
* @returns true if the control is enabled, false if not
|
|
5007
|
+
* @see {@link https://community.bistudio.com/wiki/ctrlEnabled}
|
|
5008
|
+
* @sqfsyntaxtype unary
|
|
5009
|
+
*/
|
|
5010
|
+
export function ctrlEnabledV2(controlName: Control): boolean
|
|
5011
|
+
|
|
5012
|
+
/**
|
|
5013
|
+
* Shows or hides a control, or group of controls together with all the controls
|
|
5014
|
+
* inside that group of controls. Read Arma: GUI Configuration for more information
|
|
5015
|
+
* about user dialogs and controls. ⓘUsing ctrlShow on a controls group will show
|
|
5016
|
+
* or hide all controls within the controls group (including controls that are
|
|
5017
|
+
* placed in nested controls groups).
|
|
5018
|
+
*
|
|
5019
|
+
* @param idc - control IDC
|
|
5020
|
+
* @param show - true to show the control, false to hide it
|
|
5021
|
+
* @see {@link https://community.bistudio.com/wiki/ctrlShow}
|
|
5022
|
+
* @sqfsyntaxtype unary
|
|
5023
|
+
*/
|
|
5024
|
+
export function ctrlShow(idc: number, show: boolean): void
|
|
5025
|
+
|
|
5026
|
+
/**
|
|
5027
|
+
* Shows or hides a control, or group of controls together with all the controls
|
|
5028
|
+
* inside that group of controls. Read Arma: GUI Configuration for more information
|
|
5029
|
+
* about user dialogs and controls. ⓘUsing ctrlShow on a controls group will show
|
|
5030
|
+
* or hide all controls within the controls group (including controls that are
|
|
5031
|
+
* placed in nested controls groups).
|
|
5032
|
+
*
|
|
5033
|
+
* @param show - true to show the control, false to hide it
|
|
5034
|
+
* @see {@link https://community.bistudio.com/wiki/ctrlShow}
|
|
5035
|
+
* @sqfsyntaxtype binary
|
|
5036
|
+
*/
|
|
5037
|
+
export function ctrlShowV2(control: Control, show: boolean): void
|
|
5038
|
+
|
|
5039
|
+
/**
|
|
5040
|
+
* Returns the text of a control of the currently active user dialog. This command
|
|
5041
|
+
* can be used on static texts, buttons, edit lines and active texts as well as for
|
|
5042
|
+
* images, where it returns the image path. Does not work on HTML control and
|
|
5043
|
+
* returns empty string "". Since 2.05 supported control types are: * CT_STATIC
|
|
5044
|
+
* • CT_EDIT
|
|
5045
|
+
* • CT_XKEYDESC
|
|
5046
|
+
* • CT_XBUTTON
|
|
5047
|
+
* • CT_SHORTCUTBUTTON
|
|
5048
|
+
* • CT_STRUCTURED_TEXT
|
|
5049
|
+
* • CT_BUTTON
|
|
5050
|
+
* • CT_ACTIVETEXT Since 2.20 CT_PROGRESS is also supported.
|
|
5051
|
+
*
|
|
5052
|
+
* @param idc - control ID
|
|
5053
|
+
* @returns the text or image path or texture is returned, dependent on the control type
|
|
5054
|
+
* @see {@link https://community.bistudio.com/wiki/ctrlText}
|
|
5055
|
+
* @sqfsyntaxtype unary
|
|
5056
|
+
*/
|
|
5057
|
+
export function ctrlText(idc: number): string
|
|
5058
|
+
|
|
5059
|
+
/**
|
|
5060
|
+
* Returns the text of a control of the currently active user dialog. This command
|
|
5061
|
+
* can be used on static texts, buttons, edit lines and active texts as well as for
|
|
5062
|
+
* images, where it returns the image path. Does not work on HTML control and
|
|
5063
|
+
* returns empty string "". Since 2.05 supported control types are: * CT_STATIC
|
|
5064
|
+
* • CT_EDIT
|
|
5065
|
+
* • CT_XKEYDESC
|
|
5066
|
+
* • CT_XBUTTON
|
|
5067
|
+
* • CT_SHORTCUTBUTTON
|
|
5068
|
+
* • CT_STRUCTURED_TEXT
|
|
5069
|
+
* • CT_BUTTON
|
|
5070
|
+
* • CT_ACTIVETEXT Since 2.20 CT_PROGRESS is also supported.
|
|
5071
|
+
*
|
|
5072
|
+
* @param controlName - control
|
|
5073
|
+
* @returns the text or image path or texture is returned, dependent on the control type
|
|
5074
|
+
* @see {@link https://community.bistudio.com/wiki/ctrlText}
|
|
5075
|
+
* @sqfsyntaxtype unary
|
|
5076
|
+
*/
|
|
5077
|
+
export function ctrlTextV2(controlName: Control): string
|
|
5078
|
+
|
|
5079
|
+
/**
|
|
5080
|
+
* Limit the speed of an AI-driven vehicle or AI person to given value. It has
|
|
5081
|
+
* continuous effect and AI will not break through the speed limitation until one
|
|
5082
|
+
* is contacted, engaged or regrouped.
|
|
5083
|
+
*
|
|
5084
|
+
* @param speed - in km/h; By default, it's 2 * maxSpeed of the vehicle/unit (which is defined in
|
|
5085
|
+
* config)
|
|
5086
|
+
* @see {@link https://community.bistudio.com/wiki/limitSpeed}
|
|
5087
|
+
* @sqfsyntaxtype binary
|
|
5088
|
+
*/
|
|
5089
|
+
export function limitSpeed(objectName: GameObject, speed: number | boolean): void
|
|
5090
|
+
|
|
5091
|
+
/**
|
|
5092
|
+
* Adds a row of strings.
|
|
5093
|
+
*
|
|
5094
|
+
* @returns row index
|
|
5095
|
+
* @see {@link https://community.bistudio.com/wiki/lnbAddRow}
|
|
5096
|
+
* @sqfsyntaxtype unary
|
|
5097
|
+
*/
|
|
5098
|
+
export function lnbAddRow(ctrl: number | Control, data: Array<string>): number
|
|
5099
|
+
|
|
5100
|
+
/**
|
|
5101
|
+
* Adds a row of strings.
|
|
5102
|
+
*
|
|
5103
|
+
* @returns row index
|
|
5104
|
+
* @see {@link https://community.bistudio.com/wiki/lnbAddRow}
|
|
5105
|
+
* @sqfsyntaxtype binary
|
|
5106
|
+
*/
|
|
5107
|
+
export function lnbAddRowV2(ctrl: Control, data: Array<string>): number
|
|
5108
|
+
|
|
5109
|
+
/**
|
|
5110
|
+
* Clears all items in the given listbox or combobox.
|
|
5111
|
+
*
|
|
5112
|
+
* @see {@link https://community.bistudio.com/wiki/lnbClear}
|
|
5113
|
+
* @sqfsyntaxtype unary
|
|
5114
|
+
*/
|
|
5115
|
+
export function lnbClear(idc: number): void
|
|
5116
|
+
|
|
5117
|
+
/**
|
|
5118
|
+
* Clears all items in the given listbox or combobox.
|
|
5119
|
+
*
|
|
5120
|
+
* @see {@link https://community.bistudio.com/wiki/lnbClear}
|
|
5121
|
+
* @sqfsyntaxtype unary
|
|
5122
|
+
*/
|
|
5123
|
+
export function lnbClearV2(ctrl: Control): void
|
|
5124
|
+
|
|
5125
|
+
/**
|
|
5126
|
+
* Returns the index of the selected row id 2D listbox.
|
|
5127
|
+
*
|
|
5128
|
+
* @returns number
|
|
5129
|
+
* @see {@link https://community.bistudio.com/wiki/lnbCurSelRow}
|
|
5130
|
+
* @sqfsyntaxtype unary
|
|
5131
|
+
*/
|
|
5132
|
+
export function lnbCurSelRow(idc: number): number
|
|
5133
|
+
|
|
5134
|
+
/**
|
|
5135
|
+
* Returns the index of the selected row id 2D listbox.
|
|
5136
|
+
*
|
|
5137
|
+
* @returns number
|
|
5138
|
+
* @see {@link https://community.bistudio.com/wiki/lnbCurSelRow}
|
|
5139
|
+
* @sqfsyntaxtype unary
|
|
5140
|
+
*/
|
|
5141
|
+
export function lnbCurSelRowV2(ctrl: Control): number
|
|
5142
|
+
|
|
5143
|
+
/**
|
|
5144
|
+
* Returns the additional text (invisible) in an item with the given position of
|
|
5145
|
+
* the 2D listbox.
|
|
5146
|
+
*
|
|
5147
|
+
* @returns string
|
|
5148
|
+
* @see {@link https://community.bistudio.com/wiki/lnbData}
|
|
5149
|
+
* @sqfsyntaxtype unary
|
|
5150
|
+
*/
|
|
5151
|
+
export function lnbData(idc: number | Control, row: number, column: number): string
|
|
5152
|
+
|
|
5153
|
+
/**
|
|
5154
|
+
* Returns the additional text (invisible) in an item with the given position of
|
|
5155
|
+
* the 2D listbox.
|
|
5156
|
+
*
|
|
5157
|
+
* @returns string
|
|
5158
|
+
* @see {@link https://community.bistudio.com/wiki/lnbData}
|
|
5159
|
+
* @sqfsyntaxtype binary
|
|
5160
|
+
*/
|
|
5161
|
+
export function lnbDataV2(ctrl: Control, row: number, column: number): string
|
|
5162
|
+
|
|
5163
|
+
/**
|
|
5164
|
+
* Sets the additional text (invisible) on the item with the given position of the
|
|
5165
|
+
* 2D listbox.
|
|
5166
|
+
*
|
|
5167
|
+
* @param data - the invisible text to add
|
|
5168
|
+
* @see {@link https://community.bistudio.com/wiki/lnbSetData}
|
|
5169
|
+
* @sqfsyntaxtype unary
|
|
5170
|
+
*/
|
|
5171
|
+
export function lnbSetData(idc: number, row: number, column: number, data: string): void
|
|
5172
|
+
|
|
5173
|
+
/**
|
|
5174
|
+
* Sets the additional text (invisible) on the item with the given position of the
|
|
5175
|
+
* 2D listbox.
|
|
5176
|
+
*
|
|
5177
|
+
* @param data - the invisible text to add
|
|
5178
|
+
* @see {@link https://community.bistudio.com/wiki/lnbSetData}
|
|
5179
|
+
* @sqfsyntaxtype binary
|
|
5180
|
+
*/
|
|
5181
|
+
export function lnbSetDataV2(ctrl: Control, row: number, column: number, data: string): void
|
|
5182
|
+
|
|
5183
|
+
/**
|
|
5184
|
+
* Sets the text in the item with the given position of the 2D listbox.
|
|
5185
|
+
*
|
|
5186
|
+
* @see {@link https://community.bistudio.com/wiki/lnbSetText}
|
|
5187
|
+
* @sqfsyntaxtype unary
|
|
5188
|
+
*/
|
|
5189
|
+
export function lnbSetText(idc: number, row: number, column: number, data: string): void
|
|
5190
|
+
|
|
5191
|
+
/**
|
|
5192
|
+
* Sets the text in the item with the given position of the 2D listbox.
|
|
5193
|
+
*
|
|
5194
|
+
* @see {@link https://community.bistudio.com/wiki/lnbSetText}
|
|
5195
|
+
* @sqfsyntaxtype binary
|
|
5196
|
+
*/
|
|
5197
|
+
export function lnbSetTextV2(ctrl: Control, row: number, column: number, data: string): void
|
|
5198
|
+
|
|
5199
|
+
/**
|
|
5200
|
+
* Parses the string, interpreting its content as a floating point number. ⚠This
|
|
5201
|
+
* command does not work with strings representing hexadecimal numbers (e.g
|
|
5202
|
+
* "0xCF"). parseNumber "512 + 0x2F"; // 512, WRONG! "512 + 0x2F" call
|
|
5203
|
+
* BIS_fnc_parseNumber // 559, CORRECT! ⓘStarting whitespaces are discarded, then
|
|
5204
|
+
* as many valid characters are used to be interpreted as a number until an invalid
|
|
5205
|
+
* character is found then the rest of the string is ignored.
|
|
5206
|
+
*
|
|
5207
|
+
* @returns the parsed number, 0 if no valid number was found; in the case of a passed Boolean, 0 if false, 1 if true
|
|
5208
|
+
* @see {@link https://community.bistudio.com/wiki/parseNumber}
|
|
5209
|
+
* @sqfsyntaxtype unary
|
|
5210
|
+
*/
|
|
5211
|
+
export function parseNumber(value: string | boolean | any): number
|
|
5212
|
+
|
|
4783
5213
|
|
|
4784
5214
|
export namespace bis {
|
|
4785
5215
|
/**
|