xray16 1.4.0 → 1.5.0
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/package.json +1 -1
- package/types/xr_ai/xr_action.d.ts +1321 -29
- package/types/xr_ai/xr_alife.d.ts +1336 -32
- package/types/xr_ai/xr_enemy_evaluation.d.ts +112 -19
- package/types/xr_ai/xr_goap.d.ts +450 -3
- package/types/xr_ai/xr_graph.d.ts +94 -6
- package/types/xr_ai/xr_memory.d.ts +240 -6
- package/types/xr_lib/xr_animation.d.ts +185 -14
- package/types/xr_lib/xr_bitwise.d.ts +20 -8
- package/types/xr_lib/xr_color.d.ts +103 -6
- package/types/xr_lib/xr_debug.d.ts +110 -12
- package/types/xr_lib/xr_dialog.d.ts +99 -7
- package/types/xr_lib/xr_flags.d.ts +78 -15
- package/types/xr_lib/xr_fs.d.ts +395 -5
- package/types/xr_lib/xr_game.d.ts +101 -0
- package/types/xr_lib/xr_hit.d.ts +84 -0
- package/types/xr_lib/xr_ini.d.ts +60 -2
- package/types/xr_lib/xr_level.d.ts +182 -39
- package/types/xr_lib/xr_luabind.d.ts +37 -11
- package/types/xr_lib/xr_map.d.ts +137 -6
- package/types/xr_lib/xr_math.d.ts +56 -0
- package/types/xr_lib/xr_multiplayer.d.ts +729 -1
- package/types/xr_lib/xr_profile.d.ts +80 -0
- package/types/xr_lib/xr_properties.d.ts +159 -4
- package/types/xr_lib/xr_relation.d.ts +147 -0
- package/types/xr_lib/xr_render.d.ts +99 -3
- package/types/xr_lib/xr_save.d.ts +110 -4
- package/types/xr_lib/xr_sound.d.ts +373 -9
- package/types/xr_lib/xr_stats.ts +33 -4
- package/types/xr_lib/xr_task.d.ts +277 -0
- package/types/xr_lib/xr_time.d.ts +11 -0
- package/types/xr_object/client/xr_anomaly.d.ts +20 -0
- package/types/xr_object/client/xr_artefact.d.ts +57 -2
- package/types/xr_object/client/xr_client_object.d.ts +131 -0
- package/types/xr_object/client/xr_creature.d.ts +79 -0
- package/types/xr_object/client/xr_item.d.ts +108 -2
- package/types/xr_object/client/xr_level.d.ts +482 -14
- package/types/xr_object/client/xr_physic.d.ts +459 -29
- package/types/xr_object/client/xr_zone.d.ts +38 -0
- package/types/xr_object/script/xr_script_interface.d.ts +236 -1
- package/types/xr_object/script/xr_script_object.d.ts +3402 -82
- package/types/xr_object/script/xr_script_trade.d.ts +25 -15
- package/types/xr_object/server/xr_server_object.d.ts +707 -15
- package/types/xr_ui/xr_ui_asset.d.ts +241 -6
- package/types/xr_ui/xr_ui_core.d.ts +327 -9
- package/types/xr_ui/xr_ui_event.d.ts +1067 -1
- package/types/xr_ui/xr_ui_interface.d.ts +1563 -17
- package/types/xr_ui/xr_ui_menu.d.ts +259 -16
- package/types/xrf_plugin.d.ts +44 -14
|
@@ -1,102 +1,334 @@
|
|
|
1
1
|
declare module "xray16" {
|
|
2
2
|
/**
|
|
3
|
+
* Base UI window used by script-created controls.
|
|
4
|
+
*
|
|
3
5
|
* @source C++ class CUIWindow
|
|
4
6
|
* @customConstructor CUIWindow
|
|
5
7
|
* @group xr_ui_interface
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* Coordinates use engine UI space. Child windows attached through the script binding are adopted by their parent.
|
|
6
11
|
*/
|
|
7
12
|
export class CUIWindow extends EngineBinding {
|
|
13
|
+
/**
|
|
14
|
+
* Create an empty UI window.
|
|
15
|
+
*/
|
|
8
16
|
public constructor();
|
|
9
17
|
|
|
18
|
+
/**
|
|
19
|
+
* @returns Whether the window is visible.
|
|
20
|
+
*/
|
|
10
21
|
public IsShown(): boolean;
|
|
11
22
|
|
|
23
|
+
/**
|
|
24
|
+
* @returns Whether the window accepts interaction.
|
|
25
|
+
*/
|
|
12
26
|
public IsEnabled(): boolean;
|
|
13
27
|
|
|
28
|
+
/**
|
|
29
|
+
* @returns Whether the engine owns and deletes this window with its parent.
|
|
30
|
+
*/
|
|
14
31
|
public IsAutoDelete(): boolean;
|
|
15
32
|
|
|
33
|
+
/**
|
|
34
|
+
* @returns Whether the UI cursor is currently over this window.
|
|
35
|
+
*/
|
|
16
36
|
public IsCursorOverWindow(): boolean;
|
|
17
37
|
|
|
38
|
+
/**
|
|
39
|
+
* Get the font assigned to this window.
|
|
40
|
+
*
|
|
41
|
+
* @remarks
|
|
42
|
+
* Text controls need a font assigned before drawing custom text reliably.
|
|
43
|
+
*
|
|
44
|
+
* @returns Font assigned to this window.
|
|
45
|
+
*/
|
|
18
46
|
public GetFont(): CGameFont;
|
|
19
47
|
|
|
48
|
+
/**
|
|
49
|
+
* @returns Window height.
|
|
50
|
+
*/
|
|
20
51
|
public GetHeight(): f32;
|
|
21
52
|
|
|
53
|
+
/**
|
|
54
|
+
* @returns Window width.
|
|
55
|
+
*/
|
|
22
56
|
public GetWidth(): f32;
|
|
23
57
|
|
|
58
|
+
/**
|
|
59
|
+
* @returns Window position relative to its parent.
|
|
60
|
+
*/
|
|
24
61
|
public GetWndPos(): vector2;
|
|
25
62
|
|
|
63
|
+
/**
|
|
64
|
+
* @returns Window rectangle in screen coordinates.
|
|
65
|
+
*/
|
|
26
66
|
public GetAbsoluteRect(): Frect;
|
|
27
67
|
|
|
68
|
+
/**
|
|
69
|
+
* Set the font used by this window.
|
|
70
|
+
*
|
|
71
|
+
* @param font - Font object.
|
|
72
|
+
*/
|
|
28
73
|
public SetFont(font: CGameFont): void;
|
|
29
74
|
|
|
75
|
+
/**
|
|
76
|
+
* Set window size.
|
|
77
|
+
*
|
|
78
|
+
* @param vector2 - New size.
|
|
79
|
+
*/
|
|
30
80
|
public SetWndSize(vector2: vector2): void;
|
|
31
81
|
|
|
82
|
+
/**
|
|
83
|
+
* Set window size.
|
|
84
|
+
*
|
|
85
|
+
* @param width - New width.
|
|
86
|
+
* @param height - New height.
|
|
87
|
+
*/
|
|
32
88
|
public SetWndSize(width: f32, height: f32): void;
|
|
33
89
|
|
|
90
|
+
/**
|
|
91
|
+
* Set debug/window name.
|
|
92
|
+
*
|
|
93
|
+
* @param name - Window name.
|
|
94
|
+
*/
|
|
34
95
|
public SetWindowName(name: string): void;
|
|
35
96
|
|
|
97
|
+
/**
|
|
98
|
+
* Set window position.
|
|
99
|
+
*
|
|
100
|
+
* @param vector2 - New position.
|
|
101
|
+
*/
|
|
36
102
|
public SetWndPos(vector2: vector2): void;
|
|
37
103
|
|
|
104
|
+
/**
|
|
105
|
+
* Set window position.
|
|
106
|
+
*
|
|
107
|
+
* @param x1 - X position.
|
|
108
|
+
* @param y1 - Y position.
|
|
109
|
+
*/
|
|
38
110
|
public SetWndPos(x1: f32, y1: f32): void;
|
|
39
111
|
|
|
112
|
+
/**
|
|
113
|
+
* Set whether the parent owns this child window.
|
|
114
|
+
*
|
|
115
|
+
* @remarks
|
|
116
|
+
* Use this for script-created windows that are attached to a parent and should be cleaned up with the UI tree.
|
|
117
|
+
*
|
|
118
|
+
* @param auto_delete - Whether the engine should delete the child automatically.
|
|
119
|
+
*/
|
|
40
120
|
public SetAutoDelete(auto_delete: boolean): void;
|
|
41
121
|
|
|
122
|
+
/**
|
|
123
|
+
* Enable post-process mode for this window.
|
|
124
|
+
*
|
|
125
|
+
* @remarks
|
|
126
|
+
* Use for windows meant to be drawn through the post-process UI path, and reset it when the window returns to
|
|
127
|
+
* normal UI rendering.
|
|
128
|
+
*/
|
|
42
129
|
public SetPPMode(): void;
|
|
43
130
|
|
|
131
|
+
/**
|
|
132
|
+
* Set window height.
|
|
133
|
+
*
|
|
134
|
+
* @param height - New height.
|
|
135
|
+
*/
|
|
44
136
|
public SetHeight(height: f32): void;
|
|
45
137
|
|
|
138
|
+
/**
|
|
139
|
+
* Set window width.
|
|
140
|
+
*
|
|
141
|
+
* @param width - New width.
|
|
142
|
+
*/
|
|
46
143
|
public SetWidth(width: f32): void;
|
|
47
144
|
|
|
145
|
+
/**
|
|
146
|
+
* Set window rectangle.
|
|
147
|
+
*
|
|
148
|
+
* @param rect - New rectangle.
|
|
149
|
+
*/
|
|
48
150
|
public SetWndRect(rect: Frect): void;
|
|
49
151
|
|
|
152
|
+
/**
|
|
153
|
+
* Set window rectangle.
|
|
154
|
+
*
|
|
155
|
+
* @remarks
|
|
156
|
+
* Coordinates are relative to the parent; `x2` and `y2` are size, not bottom-right coordinates.
|
|
157
|
+
*
|
|
158
|
+
* @param x1 - X position.
|
|
159
|
+
* @param y1 - Y position.
|
|
160
|
+
* @param x2 - Width.
|
|
161
|
+
* @param y2 - Height.
|
|
162
|
+
*/
|
|
50
163
|
public SetWndRect(x1: f32, y1: f32, x2: f32, y2: f32): void;
|
|
51
164
|
|
|
165
|
+
/**
|
|
166
|
+
* @returns Level time when this window received focus.
|
|
167
|
+
*/
|
|
52
168
|
public FocusReceiveTime(): u32;
|
|
53
169
|
|
|
170
|
+
/**
|
|
171
|
+
* Initialize window rectangle.
|
|
172
|
+
*
|
|
173
|
+
* @param frect - Window rectangle.
|
|
174
|
+
*/
|
|
54
175
|
public Init(frect: Frect): void;
|
|
55
176
|
|
|
177
|
+
/**
|
|
178
|
+
* Initialize window rectangle.
|
|
179
|
+
*
|
|
180
|
+
* @remarks
|
|
181
|
+
* Coordinates are relative to the parent; `x2` and `y2` are size, not bottom-right coordinates.
|
|
182
|
+
*
|
|
183
|
+
* @param x1 - X position.
|
|
184
|
+
* @param y1 - Y position.
|
|
185
|
+
* @param x2 - Width.
|
|
186
|
+
* @param y2 - Height.
|
|
187
|
+
*/
|
|
56
188
|
public Init(x1: f32, y1: f32, x2: f32, y2: f32): void;
|
|
57
189
|
|
|
190
|
+
/**
|
|
191
|
+
* Enable or disable interaction.
|
|
192
|
+
*
|
|
193
|
+
* @remarks
|
|
194
|
+
* Enabled state and visibility are separate. Hidden controls can still be enabled.
|
|
195
|
+
*
|
|
196
|
+
* @param is_enabled - Whether the window should be enabled.
|
|
197
|
+
*/
|
|
58
198
|
public Enable(is_enabled: boolean): void;
|
|
59
199
|
|
|
200
|
+
/**
|
|
201
|
+
* Attach a child window.
|
|
202
|
+
*
|
|
203
|
+
* @remarks
|
|
204
|
+
* The Lua binding adopts `child`; after attachment, treat the parent as owning its lifetime.
|
|
205
|
+
*
|
|
206
|
+
* @param child - Child window.
|
|
207
|
+
*/
|
|
60
208
|
public AttachChild(child: CUIWindow): void;
|
|
61
209
|
|
|
210
|
+
/**
|
|
211
|
+
* Detach a child window.
|
|
212
|
+
*
|
|
213
|
+
* @remarks
|
|
214
|
+
* Detaching removes the parent relation. It does not reinitialize the window or attach it elsewhere.
|
|
215
|
+
*
|
|
216
|
+
* @param child - Child window.
|
|
217
|
+
*/
|
|
62
218
|
public DetachChild(child: CUIWindow): void;
|
|
63
219
|
|
|
220
|
+
/**
|
|
221
|
+
* @returns Window name.
|
|
222
|
+
*/
|
|
64
223
|
public WindowName(): string;
|
|
65
224
|
|
|
225
|
+
/**
|
|
226
|
+
* Disable post-process mode for this window.
|
|
227
|
+
*
|
|
228
|
+
* @remarks
|
|
229
|
+
* Pair with {@link CUIWindow.SetPPMode} when a window no longer needs post-process rendering.
|
|
230
|
+
*/
|
|
66
231
|
public ResetPPMode(): void;
|
|
67
232
|
|
|
233
|
+
/**
|
|
234
|
+
* Show or hide the window.
|
|
235
|
+
*
|
|
236
|
+
* @remarks
|
|
237
|
+
* Visibility does not attach, detach, enable, or disable the window.
|
|
238
|
+
*
|
|
239
|
+
* @param show - Whether the window should be visible.
|
|
240
|
+
*/
|
|
68
241
|
public Show(show: boolean): void;
|
|
69
242
|
}
|
|
70
243
|
|
|
71
244
|
/**
|
|
245
|
+
* UI binding for `CServerList`.
|
|
246
|
+
*
|
|
72
247
|
* @source C++ class CServerList : CUIWindow
|
|
73
248
|
* @customConstructor CServerList
|
|
74
249
|
* @group xr_ui_interface
|
|
250
|
+
*
|
|
251
|
+
* @remarks
|
|
252
|
+
* Used by main-menu multiplayer screens. Calls assume the server browser UI is initialized.
|
|
75
253
|
*/
|
|
76
254
|
export class CServerList extends CUIWindow {
|
|
255
|
+
/**
|
|
256
|
+
* Engine enum value for `CServerList.ece_unique_nick_expired`.
|
|
257
|
+
*/
|
|
77
258
|
public static readonly ece_unique_nick_expired: 2;
|
|
259
|
+
/**
|
|
260
|
+
* Engine enum value for `CServerList.ece_unique_nick_not_registred`.
|
|
261
|
+
*/
|
|
78
262
|
public static readonly ece_unique_nick_not_registred: 1;
|
|
79
263
|
|
|
264
|
+
/**
|
|
265
|
+
* Set the player name used for server browser queries.
|
|
266
|
+
*
|
|
267
|
+
* @param name - Player name.
|
|
268
|
+
*/
|
|
80
269
|
public SetPlayerName(name: string): void;
|
|
81
270
|
|
|
271
|
+
/**
|
|
272
|
+
* Apply server browser filters.
|
|
273
|
+
*
|
|
274
|
+
* @param filters - Filter settings.
|
|
275
|
+
*/
|
|
82
276
|
public SetFilters(filters: SServerFilters): void;
|
|
83
277
|
|
|
278
|
+
/**
|
|
279
|
+
* Refresh the server list.
|
|
280
|
+
*
|
|
281
|
+
* @param value - Whether to force a refresh.
|
|
282
|
+
*/
|
|
84
283
|
public RefreshList(value: boolean): void;
|
|
85
284
|
|
|
86
|
-
|
|
87
|
-
|
|
285
|
+
/**
|
|
286
|
+
* Set server list sorting.
|
|
287
|
+
*
|
|
288
|
+
* @param sort_column - Column or field name to sort by.
|
|
289
|
+
* @param ascending - Whether sorting is ascending.
|
|
290
|
+
*/
|
|
291
|
+
public SetSortFunc(sort_column: string, ascending: boolean): void;
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* Switch between internet and LAN server sources.
|
|
295
|
+
*
|
|
296
|
+
* @param value - Whether network radio mode is enabled.
|
|
297
|
+
*/
|
|
88
298
|
public NetRadioChanged(value: boolean): void;
|
|
89
299
|
|
|
300
|
+
/**
|
|
301
|
+
* Show details for the selected server.
|
|
302
|
+
*/
|
|
90
303
|
public ShowServerInfo(): void;
|
|
91
304
|
|
|
305
|
+
/**
|
|
306
|
+
* Refresh the quick server list view.
|
|
307
|
+
*/
|
|
92
308
|
public RefreshQuick(): void;
|
|
93
309
|
|
|
310
|
+
/**
|
|
311
|
+
* Connect to the selected server.
|
|
312
|
+
*
|
|
313
|
+
* @remarks
|
|
314
|
+
* Requires a selected server row in the current list.
|
|
315
|
+
*/
|
|
94
316
|
public ConnectToSelected(): void;
|
|
95
317
|
|
|
318
|
+
/**
|
|
319
|
+
* Set callback for connection errors.
|
|
320
|
+
*
|
|
321
|
+
* @remarks
|
|
322
|
+
* Keep the callback object alive for as long as the server list may report connection failures.
|
|
323
|
+
*
|
|
324
|
+
* @param cb - Error callback.
|
|
325
|
+
*/
|
|
96
326
|
public SetConnectionErrCb(cb: connect_error_cb): void;
|
|
97
327
|
}
|
|
98
328
|
|
|
99
329
|
/**
|
|
330
|
+
* UI binding for `CUIButton`.
|
|
331
|
+
*
|
|
100
332
|
* @source C++ class CUIButton : CUIStatic
|
|
101
333
|
* @customConstructor CUIButton
|
|
102
334
|
* @group xr_ui_interface
|
|
@@ -104,6 +336,8 @@ declare module "xray16" {
|
|
|
104
336
|
export class CUIButton extends CUIStatic {}
|
|
105
337
|
|
|
106
338
|
/**
|
|
339
|
+
* UI binding for `CUI3tButton`.
|
|
340
|
+
*
|
|
107
341
|
* @source C++ class CUI3tButton : CUIButton
|
|
108
342
|
* @customConstructor CUI3tButton
|
|
109
343
|
* @group xr_ui_interface
|
|
@@ -111,242 +345,685 @@ declare module "xray16" {
|
|
|
111
345
|
export class CUI3tButton extends CUIButton {}
|
|
112
346
|
|
|
113
347
|
/**
|
|
348
|
+
* UI binding for `CUICheckButton`.
|
|
349
|
+
*
|
|
114
350
|
* @source C++ class CUICheckButton : CUI3tButton
|
|
115
351
|
* @customConstructor CUICheckButton
|
|
116
352
|
* @group xr_ui_interface
|
|
117
353
|
*/
|
|
118
354
|
export class CUICheckButton extends CUI3tButton {
|
|
355
|
+
/**
|
|
356
|
+
* Set checked state.
|
|
357
|
+
*
|
|
358
|
+
* @param value - New checked state.
|
|
359
|
+
*/
|
|
119
360
|
public SetCheck(value: boolean): void;
|
|
120
361
|
|
|
362
|
+
/**
|
|
363
|
+
* @returns Whether the button is checked.
|
|
364
|
+
*/
|
|
121
365
|
public GetCheck(): boolean;
|
|
122
366
|
|
|
367
|
+
/**
|
|
368
|
+
* Bind another control to this checkbox state.
|
|
369
|
+
*
|
|
370
|
+
* @remarks
|
|
371
|
+
* The dependent control follows this checkbox state in the UI.
|
|
372
|
+
*
|
|
373
|
+
* @param window - Dependent control.
|
|
374
|
+
*/
|
|
123
375
|
public SetDependControl(window: CUIWindow): void;
|
|
124
376
|
}
|
|
125
377
|
|
|
126
378
|
/**
|
|
379
|
+
* UI binding for `CUIComboBox`.
|
|
380
|
+
*
|
|
127
381
|
* @source C++ class CUIComboBox : CUIWindow
|
|
128
382
|
* @customConstructor CUIComboBox
|
|
129
383
|
* @group xr_ui_interface
|
|
384
|
+
*
|
|
385
|
+
* @remarks
|
|
386
|
+
* Item ids and list indices are different. Use ids for stable values and indices for visual order.
|
|
130
387
|
*/
|
|
131
388
|
export class CUIComboBox extends CUIWindow {
|
|
389
|
+
/**
|
|
390
|
+
* Enable an item by id.
|
|
391
|
+
*
|
|
392
|
+
* @remarks
|
|
393
|
+
* `id` is the item id passed to {@link CUIComboBox.AddItem}, not the visual index.
|
|
394
|
+
*
|
|
395
|
+
* @param id - Item id.
|
|
396
|
+
*/
|
|
132
397
|
public enable_id(id: i32): void;
|
|
133
398
|
|
|
399
|
+
/**
|
|
400
|
+
* Disable an item by id.
|
|
401
|
+
*
|
|
402
|
+
* @remarks
|
|
403
|
+
* `id` is the item id passed to {@link CUIComboBox.AddItem}, not the visual index.
|
|
404
|
+
*
|
|
405
|
+
* @param id - Item id.
|
|
406
|
+
*/
|
|
134
407
|
public disable_id(id: i32): void;
|
|
135
408
|
|
|
409
|
+
/**
|
|
410
|
+
* Remove all items from the combo box.
|
|
411
|
+
*/
|
|
136
412
|
public ClearList(): void;
|
|
137
413
|
|
|
414
|
+
/**
|
|
415
|
+
* Set the visible text.
|
|
416
|
+
*
|
|
417
|
+
* @param text - Text to show.
|
|
418
|
+
*/
|
|
138
419
|
public SetText(text: string): void;
|
|
139
420
|
|
|
421
|
+
/**
|
|
422
|
+
* Add an item.
|
|
423
|
+
*
|
|
424
|
+
* @param label - Item text.
|
|
425
|
+
* @param id - Item id.
|
|
426
|
+
*/
|
|
140
427
|
public AddItem(label: string, id: i32): void;
|
|
141
428
|
|
|
429
|
+
/**
|
|
430
|
+
* @returns Current visible text.
|
|
431
|
+
*/
|
|
142
432
|
public GetText(): string;
|
|
143
433
|
|
|
434
|
+
/**
|
|
435
|
+
* Set visible list length.
|
|
436
|
+
*
|
|
437
|
+
* @param length - Maximum visible item count.
|
|
438
|
+
*/
|
|
144
439
|
public SetListLength(length: i32): void;
|
|
145
440
|
|
|
441
|
+
/**
|
|
442
|
+
* @returns Current item id.
|
|
443
|
+
*/
|
|
146
444
|
public CurrentID(): i32;
|
|
147
445
|
|
|
446
|
+
/**
|
|
447
|
+
* Get text for an item id.
|
|
448
|
+
*
|
|
449
|
+
* @remarks
|
|
450
|
+
* `id` is the item id passed to {@link CUIComboBox.AddItem}, not the visual index.
|
|
451
|
+
*
|
|
452
|
+
* @param id - Item id.
|
|
453
|
+
* @returns Item text.
|
|
454
|
+
*/
|
|
148
455
|
public GetTextOf(id: i32): string;
|
|
149
456
|
|
|
457
|
+
/**
|
|
458
|
+
* Apply the current option value from engine options.
|
|
459
|
+
*/
|
|
150
460
|
public SetCurrentOptValue(): void;
|
|
151
461
|
|
|
462
|
+
/**
|
|
463
|
+
* Enable or disable the vertical scrollbar.
|
|
464
|
+
*
|
|
465
|
+
* @param enabled - Whether vertical scrolling is enabled.
|
|
466
|
+
*/
|
|
152
467
|
public SetVertScroll(enabled: boolean): void;
|
|
153
468
|
|
|
469
|
+
/**
|
|
470
|
+
* Select an item by id.
|
|
471
|
+
*
|
|
472
|
+
* @remarks
|
|
473
|
+
* `id` is the item id passed to {@link CUIComboBox.AddItem}, not the visual index.
|
|
474
|
+
*
|
|
475
|
+
* @param id - Item id.
|
|
476
|
+
*/
|
|
154
477
|
public SetCurrentID(id: i32): void;
|
|
155
478
|
|
|
479
|
+
/**
|
|
480
|
+
* Select an item by index.
|
|
481
|
+
*
|
|
482
|
+
* @remarks
|
|
483
|
+
* Index follows current visual order and can change when the list contents change.
|
|
484
|
+
*
|
|
485
|
+
* @param index - Item index.
|
|
486
|
+
*/
|
|
156
487
|
public SetCurrentIdx(index: u32): void;
|
|
157
488
|
|
|
489
|
+
/**
|
|
490
|
+
* @returns Current selected item index.
|
|
491
|
+
*/
|
|
158
492
|
public GetCurrentIdx(): u32;
|
|
159
493
|
|
|
494
|
+
/**
|
|
495
|
+
* Apply the current combo value.
|
|
496
|
+
*/
|
|
160
497
|
public SetCurrentValue(): void;
|
|
161
498
|
}
|
|
162
499
|
|
|
163
500
|
/**
|
|
501
|
+
* UI binding for `CUICustomEdit`.
|
|
502
|
+
*
|
|
164
503
|
* @source C++ class CUICustomEdit : CUIWindow
|
|
165
504
|
* @customConstructor CUICustomEdit
|
|
166
505
|
* @group xr_ui_interface
|
|
506
|
+
*
|
|
507
|
+
* @remarks
|
|
508
|
+
* Focus capture controls where keyboard input is routed between edit controls.
|
|
167
509
|
*/
|
|
168
510
|
export class CUICustomEdit extends CUIWindow {
|
|
511
|
+
/**
|
|
512
|
+
* @returns Current edit text.
|
|
513
|
+
*/
|
|
169
514
|
public GetText(): string;
|
|
170
515
|
|
|
516
|
+
/**
|
|
517
|
+
* Set edit text.
|
|
518
|
+
*
|
|
519
|
+
* @param text - New text.
|
|
520
|
+
*/
|
|
171
521
|
public SetText(text: string): void;
|
|
172
522
|
|
|
523
|
+
/**
|
|
524
|
+
* Set the edit control that receives focus after this one.
|
|
525
|
+
*
|
|
526
|
+
* @param edit - Next edit control.
|
|
527
|
+
*/
|
|
173
528
|
public SetNextFocusCapturer(edit: CUICustomEdit): void;
|
|
174
529
|
|
|
530
|
+
/**
|
|
531
|
+
* Capture or release keyboard focus.
|
|
532
|
+
*
|
|
533
|
+
* @remarks
|
|
534
|
+
* Captured focus routes keyboard input to this edit control until it is released or moved to another capturer.
|
|
535
|
+
*
|
|
536
|
+
* @param value - Whether focus should be captured.
|
|
537
|
+
*/
|
|
175
538
|
public CaptureFocus(value: boolean): void;
|
|
176
539
|
}
|
|
177
540
|
|
|
178
541
|
/**
|
|
542
|
+
* UI binding for `CUICustomSpin`.
|
|
543
|
+
*
|
|
179
544
|
* @source C++ class CUICustomSpin : CUIWindow
|
|
180
545
|
* @customConstructor CUICustomSpin
|
|
181
546
|
* @group xr_ui_interface
|
|
182
547
|
*/
|
|
183
548
|
export class CUICustomSpin extends CUIWindow {
|
|
549
|
+
/**
|
|
550
|
+
* @returns Current spin text.
|
|
551
|
+
*/
|
|
184
552
|
public GetText(): string;
|
|
185
553
|
}
|
|
186
554
|
|
|
187
555
|
/**
|
|
556
|
+
* UI binding for `CUIDialogWnd`.
|
|
557
|
+
*
|
|
188
558
|
* @source C++ class CUIDialogWnd : CUIWindow
|
|
189
559
|
* @customConstructor CUIDialogWnd
|
|
190
560
|
* @group xr_ui_interface
|
|
561
|
+
*
|
|
562
|
+
* @remarks
|
|
563
|
+
* Dialogs receive rendering and input only after they are connected to a `CDialogHolder`.
|
|
191
564
|
*/
|
|
192
|
-
|
|
193
565
|
export class CUIDialogWnd extends CUIWindow {
|
|
566
|
+
/**
|
|
567
|
+
* Hide the dialog.
|
|
568
|
+
*/
|
|
194
569
|
public HideDialog(): void;
|
|
195
570
|
|
|
571
|
+
/**
|
|
572
|
+
* Show or hide the dialog.
|
|
573
|
+
*
|
|
574
|
+
* @param show - Whether the dialog should be visible.
|
|
575
|
+
*/
|
|
196
576
|
public ShowDialog(show: boolean): void;
|
|
197
577
|
|
|
578
|
+
/**
|
|
579
|
+
* Get the dialog holder.
|
|
580
|
+
*
|
|
581
|
+
* @remarks
|
|
582
|
+
* The holder is available only after the dialog is assigned to one by the owning UI flow.
|
|
583
|
+
*
|
|
584
|
+
* @returns Dialog holder.
|
|
585
|
+
*/
|
|
198
586
|
public GetHolder(): CDialogHolder;
|
|
199
587
|
|
|
588
|
+
/**
|
|
589
|
+
* Assign a dialog holder.
|
|
590
|
+
*
|
|
591
|
+
* @param holder - Dialog holder.
|
|
592
|
+
*/
|
|
200
593
|
public SetHolder(holder: CDialogHolder): void;
|
|
201
594
|
}
|
|
202
595
|
|
|
203
596
|
/**
|
|
597
|
+
* UI binding for `CUIScriptWnd`.
|
|
598
|
+
*
|
|
204
599
|
* @source C++ class CUIScriptWnd : CUIDialogWnd,DLL_Pure
|
|
205
600
|
* @customConstructor CUIScriptWnd
|
|
206
601
|
* @group xr_ui_interface
|
|
602
|
+
*
|
|
603
|
+
* @remarks
|
|
604
|
+
* Register child controls before adding callbacks or using typed lookup helpers.
|
|
207
605
|
*/
|
|
208
606
|
export class CUIScriptWnd extends CUIDialogWnd {
|
|
607
|
+
/**
|
|
608
|
+
* Create a script-driven dialog window.
|
|
609
|
+
*/
|
|
209
610
|
public constructor();
|
|
210
611
|
|
|
612
|
+
/**
|
|
613
|
+
* Handle keyboard input.
|
|
614
|
+
*
|
|
615
|
+
* @remarks
|
|
616
|
+
* Called by the dialog holder/input stack. Return `true` only when the script window handled the key.
|
|
617
|
+
*
|
|
618
|
+
* @param key - DIK key code.
|
|
619
|
+
* @param event - UI keyboard event.
|
|
620
|
+
* @returns Whether the event was handled.
|
|
621
|
+
*/
|
|
211
622
|
public OnKeyboard(key: TXR_DIK_key, event: TXR_ui_event): boolean;
|
|
212
623
|
|
|
624
|
+
/**
|
|
625
|
+
* Update the script window.
|
|
626
|
+
*/
|
|
213
627
|
public Update(): void;
|
|
214
628
|
|
|
629
|
+
/**
|
|
630
|
+
* Register a named UI callback.
|
|
631
|
+
*
|
|
632
|
+
* @remarks
|
|
633
|
+
* The callback is matched by control name and event. Register the target control first so its window name and
|
|
634
|
+
* message target are set on this script window.
|
|
635
|
+
*
|
|
636
|
+
* @param name - Control name.
|
|
637
|
+
* @param event - UI event id.
|
|
638
|
+
* @param cb - Callback function.
|
|
639
|
+
* @param source - Optional callback owner.
|
|
640
|
+
*/
|
|
215
641
|
public AddCallback(name: string, event: number, cb: (this: void) => void, source?: CUIWindow): void;
|
|
216
642
|
|
|
643
|
+
/**
|
|
644
|
+
* Dispatch a UI command.
|
|
645
|
+
*
|
|
646
|
+
* @remarks
|
|
647
|
+
* Used for dialog command routing. Return `true` only when the command was handled.
|
|
648
|
+
*
|
|
649
|
+
* @param command - Command id.
|
|
650
|
+
* @param parameter - Command parameter.
|
|
651
|
+
* @returns Whether the command was handled.
|
|
652
|
+
*/
|
|
217
653
|
public Dispatch(command: number, parameter: number): boolean;
|
|
218
654
|
|
|
219
|
-
|
|
220
|
-
|
|
655
|
+
/**
|
|
656
|
+
* Register a child window for lookup and callbacks.
|
|
657
|
+
*
|
|
658
|
+
* @remarks
|
|
659
|
+
* Registration sets this script window as the child's message target. When `name` is provided, it also replaces
|
|
660
|
+
* the child's window name used by callback matching and typed lookup.
|
|
661
|
+
*
|
|
662
|
+
* @param window - Child window.
|
|
663
|
+
* @param name - Optional registration name.
|
|
664
|
+
*/
|
|
665
|
+
public Register(window: CUIWindow, name?: string): void;
|
|
666
|
+
|
|
667
|
+
/**
|
|
668
|
+
* Load a UI section or XML resource.
|
|
669
|
+
*
|
|
670
|
+
* @remarks
|
|
671
|
+
* The base `CUIScriptWnd` binding accepts the value but always reports success. Real loading is usually done by
|
|
672
|
+
* XML helper code before controls are registered.
|
|
673
|
+
*
|
|
674
|
+
* @param value - Resource or section name.
|
|
675
|
+
* @returns Whether the load succeeded.
|
|
676
|
+
*/
|
|
221
677
|
public Load(value: string): boolean;
|
|
222
678
|
|
|
679
|
+
/**
|
|
680
|
+
* Find a list window by id.
|
|
681
|
+
*
|
|
682
|
+
* @param id - Window id.
|
|
683
|
+
* @returns Control instance, or `null` when not found or not matching.
|
|
684
|
+
*/
|
|
223
685
|
public GetListWnd(id: string): CUIListWnd | null;
|
|
224
686
|
|
|
687
|
+
/**
|
|
688
|
+
* Find a dialog window by id.
|
|
689
|
+
*
|
|
690
|
+
* @param id - Window id.
|
|
691
|
+
* @returns Control instance, or `null` when not found or not matching.
|
|
692
|
+
*/
|
|
225
693
|
public GetDialogWnd(id: string): CUIDialogWnd | null;
|
|
226
694
|
|
|
695
|
+
/**
|
|
696
|
+
* Find an edit box by id.
|
|
697
|
+
*
|
|
698
|
+
* @param id - Window id.
|
|
699
|
+
* @returns Control instance, or `null` when not found or not matching.
|
|
700
|
+
*/
|
|
227
701
|
public GetEditBox(id: string): CUIEditBox | null;
|
|
228
702
|
|
|
703
|
+
/**
|
|
704
|
+
* Find a list box by id.
|
|
705
|
+
*
|
|
706
|
+
* @param id - Window id.
|
|
707
|
+
* @returns Control instance, or `null` when not found or not matching.
|
|
708
|
+
*/
|
|
229
709
|
public GetListBox(id: string): CUIListBox | null;
|
|
230
710
|
|
|
711
|
+
/**
|
|
712
|
+
* Find a frame line by id.
|
|
713
|
+
*
|
|
714
|
+
* @param id - Window id.
|
|
715
|
+
* @returns Control instance, or `null` when not found or not matching.
|
|
716
|
+
*/
|
|
231
717
|
public GetFrameLineWnd(id: string): CUIFrameLineWnd | null;
|
|
232
718
|
|
|
719
|
+
/**
|
|
720
|
+
* Find a tab control by id.
|
|
721
|
+
*
|
|
722
|
+
* @param id - Window id.
|
|
723
|
+
* @returns Control instance, or `null` when not found or not matching.
|
|
724
|
+
*/
|
|
233
725
|
public GetTabControl(id: string): CUITabControl | null;
|
|
234
726
|
|
|
727
|
+
/**
|
|
728
|
+
* Find a progress bar by id.
|
|
729
|
+
*
|
|
730
|
+
* @param id - Window id.
|
|
731
|
+
* @returns Control instance, or `null` when not found or not matching.
|
|
732
|
+
*/
|
|
235
733
|
public GetProgressBar(id: string): CUIProgressBar | null;
|
|
236
734
|
|
|
735
|
+
/**
|
|
736
|
+
* Find a frame window by id.
|
|
737
|
+
*
|
|
738
|
+
* @param id - Window id.
|
|
739
|
+
* @returns Control instance, or `null` when not found or not matching.
|
|
740
|
+
*/
|
|
237
741
|
public GetFrameWindow(id: string): CUIFrameWindow | null;
|
|
238
742
|
|
|
743
|
+
/**
|
|
744
|
+
* Find a static control by id.
|
|
745
|
+
*
|
|
746
|
+
* @param id - Window id.
|
|
747
|
+
* @returns Control instance, or `null` when not found or not matching.
|
|
748
|
+
*/
|
|
239
749
|
public GetStatic(id: string): CUIStatic | null;
|
|
240
750
|
}
|
|
241
751
|
|
|
242
752
|
/**
|
|
753
|
+
* UI binding for `CUIEditBox`.
|
|
754
|
+
*
|
|
243
755
|
* @source C++ class CUIEditBox : CUICustomEdit
|
|
244
756
|
* @customConstructor CUIEditBox
|
|
245
757
|
* @group xr_ui_interface
|
|
246
758
|
*/
|
|
247
759
|
export class CUIEditBox extends CUICustomEdit {
|
|
760
|
+
/**
|
|
761
|
+
* Initialize the edit box texture.
|
|
762
|
+
*
|
|
763
|
+
* @param texture_id - Texture atlas entry name.
|
|
764
|
+
*/
|
|
248
765
|
public InitTexture(texture_id: string): void;
|
|
249
766
|
}
|
|
250
767
|
|
|
251
768
|
/**
|
|
769
|
+
* UI binding for `CUIEditBoxEx`.
|
|
770
|
+
*
|
|
252
771
|
* @source C++ class CUIEditBoxEx : CUICustomEdit
|
|
253
772
|
* @customConstructor CUIEditBoxEx
|
|
254
773
|
* @group xr_ui_interface
|
|
255
774
|
*/
|
|
256
775
|
export class CUIEditBoxEx extends CUICustomEdit {
|
|
776
|
+
/**
|
|
777
|
+
* Initialize the extended edit box texture.
|
|
778
|
+
*
|
|
779
|
+
* @param texture_id - Texture atlas entry name.
|
|
780
|
+
*/
|
|
257
781
|
public InitTexture(texture_id: string): void;
|
|
258
782
|
}
|
|
259
783
|
|
|
260
784
|
/**
|
|
785
|
+
* UI binding for `CUIFrameLineWnd`.
|
|
786
|
+
*
|
|
261
787
|
* @source C++ class CUIFrameLineWnd : CUIWindow
|
|
262
788
|
* @customConstructor CUIFrameLineWnd
|
|
263
789
|
* @group xr_ui_interface
|
|
264
790
|
*/
|
|
265
791
|
export class CUIFrameLineWnd extends CUIWindow {
|
|
792
|
+
/**
|
|
793
|
+
* Set frame line color.
|
|
794
|
+
*
|
|
795
|
+
* @param color - ARGB color.
|
|
796
|
+
*/
|
|
266
797
|
public SetColor(color: u32): void;
|
|
267
798
|
}
|
|
268
799
|
|
|
269
800
|
/**
|
|
801
|
+
* UI binding for `CUIFrameWindow`.
|
|
802
|
+
*
|
|
270
803
|
* @source C++ class CUIFrameWindow : CUIWindow
|
|
271
804
|
* @customConstructor CUIFrameWindow
|
|
272
805
|
* @group xr_ui_interface
|
|
273
806
|
*/
|
|
274
807
|
export class CUIFrameWindow extends CUIWindow {
|
|
808
|
+
/**
|
|
809
|
+
* Set frame color.
|
|
810
|
+
*
|
|
811
|
+
* @param color - ARGB color.
|
|
812
|
+
*/
|
|
275
813
|
public SetColor(color: u32): void;
|
|
276
814
|
}
|
|
277
815
|
|
|
278
816
|
/**
|
|
817
|
+
* UI binding for `CUILines`.
|
|
818
|
+
*
|
|
279
819
|
* @source C++ class CUILines
|
|
280
820
|
* @customConstructor CUILines
|
|
281
821
|
* @group xr_ui_interface
|
|
282
822
|
*/
|
|
283
823
|
export class CUILines {
|
|
824
|
+
/**
|
|
825
|
+
* @returns Current text.
|
|
826
|
+
*/
|
|
284
827
|
public GetText(): string;
|
|
285
828
|
|
|
829
|
+
/**
|
|
830
|
+
* Enable or disable ellipsis.
|
|
831
|
+
*
|
|
832
|
+
* @param value - Whether long text should be ellipsized.
|
|
833
|
+
*/
|
|
286
834
|
public SetElipsis(value: boolean): void;
|
|
287
835
|
|
|
836
|
+
/**
|
|
837
|
+
* Set text font.
|
|
838
|
+
*
|
|
839
|
+
* @param value - Font object.
|
|
840
|
+
*/
|
|
288
841
|
public SetFont(value: CGameFont): void;
|
|
289
842
|
|
|
843
|
+
/**
|
|
844
|
+
* Set raw text.
|
|
845
|
+
*
|
|
846
|
+
* @param text - Text value.
|
|
847
|
+
*/
|
|
290
848
|
public SetText(text: string): void;
|
|
291
849
|
|
|
850
|
+
/**
|
|
851
|
+
* Set text color.
|
|
852
|
+
*
|
|
853
|
+
* @param color_code - ARGB color.
|
|
854
|
+
*/
|
|
292
855
|
public SetTextColor(color_code: u32): void;
|
|
293
856
|
|
|
857
|
+
/**
|
|
858
|
+
* Set translated string-table text.
|
|
859
|
+
*
|
|
860
|
+
* @param text - String table id.
|
|
861
|
+
*/
|
|
294
862
|
public SetTextST(text: string): void;
|
|
295
863
|
}
|
|
296
864
|
|
|
297
865
|
/**
|
|
866
|
+
* UI binding for `CUIListBox`.
|
|
867
|
+
*
|
|
298
868
|
* @source C++ class CUIListBox : CUIScrollView
|
|
299
869
|
* @customConstructor CUIListBox
|
|
300
870
|
* @group xr_ui_interface
|
|
871
|
+
*
|
|
872
|
+
* @remarks
|
|
873
|
+
* Items added through the script binding are owned by the list. Selection getters can return no item.
|
|
301
874
|
*/
|
|
302
875
|
export class CUIListBox<T extends CUIListBoxItem = CUIListBoxItem> extends CUIScrollView {
|
|
876
|
+
/**
|
|
877
|
+
* @returns Number of items in the list.
|
|
878
|
+
*/
|
|
303
879
|
public GetSize(): u32;
|
|
304
880
|
|
|
881
|
+
/**
|
|
882
|
+
* Get item window by index.
|
|
883
|
+
*
|
|
884
|
+
* @param index - Item index.
|
|
885
|
+
* @returns Item window.
|
|
886
|
+
*/
|
|
305
887
|
public GetItem(index: u32): CUIWindow;
|
|
306
888
|
|
|
889
|
+
/**
|
|
890
|
+
* Get typed item by index.
|
|
891
|
+
*
|
|
892
|
+
* @param index - Item index.
|
|
893
|
+
* @returns List box item.
|
|
894
|
+
*/
|
|
307
895
|
public GetItemByIndex(index: i32): T;
|
|
308
896
|
|
|
897
|
+
/**
|
|
898
|
+
* @returns Selected item index.
|
|
899
|
+
*/
|
|
309
900
|
public GetSelectedIndex(): u32;
|
|
310
901
|
|
|
902
|
+
/**
|
|
903
|
+
* @returns Selected item, or `null` when nothing is selected.
|
|
904
|
+
*/
|
|
311
905
|
public GetSelectedItem(): T | null;
|
|
312
906
|
|
|
907
|
+
/**
|
|
908
|
+
* @returns List item height.
|
|
909
|
+
*/
|
|
313
910
|
public GetItemHeight(): f32;
|
|
314
911
|
|
|
912
|
+
/**
|
|
913
|
+
* Add an existing item and transfer it to the list.
|
|
914
|
+
*
|
|
915
|
+
* @remarks
|
|
916
|
+
* The Lua binding adopts `item`; keep future lifetime management with the list.
|
|
917
|
+
*
|
|
918
|
+
* @param item - Item to add.
|
|
919
|
+
*/
|
|
315
920
|
public AddExistingItem(item: T): void;
|
|
316
921
|
|
|
922
|
+
/**
|
|
923
|
+
* Add a text item.
|
|
924
|
+
*
|
|
925
|
+
* @param text - Item text.
|
|
926
|
+
* @returns Created item.
|
|
927
|
+
*/
|
|
317
928
|
public AddTextItem(text: string): T;
|
|
318
929
|
|
|
930
|
+
/**
|
|
931
|
+
* Remove an item window.
|
|
932
|
+
*
|
|
933
|
+
* @param window - Item window.
|
|
934
|
+
*/
|
|
319
935
|
public RemoveItem(window: CUIWindow): void;
|
|
320
936
|
|
|
937
|
+
/**
|
|
938
|
+
* Remove all items.
|
|
939
|
+
*/
|
|
321
940
|
public RemoveAll(): void;
|
|
322
941
|
|
|
942
|
+
/**
|
|
943
|
+
* Scroll the selected item into view.
|
|
944
|
+
*
|
|
945
|
+
* @param value - Whether selected item should be shown.
|
|
946
|
+
*/
|
|
323
947
|
public ShowSelectedItem(value: boolean): void;
|
|
324
948
|
|
|
949
|
+
/**
|
|
950
|
+
* Set list item height.
|
|
951
|
+
*
|
|
952
|
+
* @param height - Item height.
|
|
953
|
+
*/
|
|
325
954
|
public SetItemHeight(height: f32): void;
|
|
326
955
|
|
|
956
|
+
/**
|
|
957
|
+
* Select an item by index.
|
|
958
|
+
*
|
|
959
|
+
* @param index - Item index.
|
|
960
|
+
*/
|
|
327
961
|
public SetSelectedIndex(index: u32): void;
|
|
328
962
|
}
|
|
329
963
|
|
|
330
964
|
/**
|
|
965
|
+
* UI binding for `CUIListBoxItem`.
|
|
966
|
+
*
|
|
331
967
|
* @source C++ class CUIListBoxItem : CUIFrameLineWnd
|
|
332
968
|
* @customConstructor CUIListBoxItem
|
|
333
969
|
* @group xr_ui_interface
|
|
334
970
|
*/
|
|
335
971
|
export class CUIListBoxItem extends CUIFrameLineWnd {
|
|
972
|
+
/**
|
|
973
|
+
* Create a list box item with height.
|
|
974
|
+
*
|
|
975
|
+
* @param height - Item height.
|
|
976
|
+
*/
|
|
336
977
|
public constructor(height: f32);
|
|
978
|
+
|
|
979
|
+
/**
|
|
980
|
+
* Copy an existing list box item.
|
|
981
|
+
*
|
|
982
|
+
* @param target - Source item.
|
|
983
|
+
*/
|
|
337
984
|
public constructor(target: CUIListBoxItem);
|
|
985
|
+
|
|
986
|
+
/**
|
|
987
|
+
* Copy an existing list box item and override its height.
|
|
988
|
+
*
|
|
989
|
+
* @param target - Source item.
|
|
990
|
+
* @param height - Item height.
|
|
991
|
+
*/
|
|
338
992
|
public constructor(target: CUIListBoxItem, height: f32);
|
|
339
993
|
|
|
994
|
+
/**
|
|
995
|
+
* Add an icon field to the item.
|
|
996
|
+
*
|
|
997
|
+
* @param value - Field width.
|
|
998
|
+
* @returns Created static field.
|
|
999
|
+
*/
|
|
340
1000
|
public AddIconField(value: f32): CUIStatic;
|
|
341
1001
|
|
|
1002
|
+
/**
|
|
1003
|
+
* Set item text color.
|
|
1004
|
+
*
|
|
1005
|
+
* @param color - ARGB color.
|
|
1006
|
+
*/
|
|
342
1007
|
public SetTextColor(color: u32): void;
|
|
343
1008
|
|
|
1009
|
+
/**
|
|
1010
|
+
* Add a text field to the item.
|
|
1011
|
+
*
|
|
1012
|
+
* @param text - Field text.
|
|
1013
|
+
* @param width - Field width.
|
|
1014
|
+
* @returns Created text window.
|
|
1015
|
+
*/
|
|
344
1016
|
public AddTextField(text: string, width: f32): CUITextWnd;
|
|
345
1017
|
|
|
1018
|
+
/**
|
|
1019
|
+
* @returns Main text item.
|
|
1020
|
+
*/
|
|
346
1021
|
public GetTextItem(): CUITextWnd;
|
|
347
1022
|
}
|
|
348
1023
|
|
|
349
1024
|
/**
|
|
1025
|
+
* UI binding for `CUIListBoxItemMsgChain`.
|
|
1026
|
+
*
|
|
350
1027
|
* @source C++ class CUIListBoxItemMsgChain : CUIListBoxItem
|
|
351
1028
|
* @customConstructor CUIListBoxItemMsgChain
|
|
352
1029
|
* @group xr_ui_interface
|
|
@@ -354,19 +1031,47 @@ declare module "xray16" {
|
|
|
354
1031
|
export class CUIListBoxItemMsgChain extends CUIListBoxItem {}
|
|
355
1032
|
|
|
356
1033
|
/**
|
|
1034
|
+
* UI binding for `CUIMMShniaga`.
|
|
1035
|
+
*
|
|
357
1036
|
* @source C++ class CUIMMShniaga : CUIWindow
|
|
358
1037
|
* @customConstructor CUIMMShniaga
|
|
359
1038
|
* @group xr_ui_interface
|
|
360
1039
|
*/
|
|
361
1040
|
export class CUIMMShniaga extends CUIWindow {
|
|
1041
|
+
/**
|
|
1042
|
+
* Engine enum value for `CUIMMShniaga.epi_main`.
|
|
1043
|
+
*/
|
|
362
1044
|
public static readonly epi_main: 0;
|
|
1045
|
+
/**
|
|
1046
|
+
* Engine enum value for `CUIMMShniaga.epi_new_game`.
|
|
1047
|
+
*/
|
|
363
1048
|
public static readonly epi_new_game: 1;
|
|
1049
|
+
/**
|
|
1050
|
+
* Engine enum value for `CUIMMShniaga.epi_new_network_game`.
|
|
1051
|
+
*/
|
|
364
1052
|
public static readonly epi_new_network_game: 2;
|
|
365
1053
|
|
|
1054
|
+
/**
|
|
1055
|
+
* Show a main-menu page.
|
|
1056
|
+
*
|
|
1057
|
+
* @param page_id - Page id.
|
|
1058
|
+
*/
|
|
366
1059
|
public ShowPage(page_id: TXR_MMShniaga_page): void;
|
|
367
1060
|
|
|
1061
|
+
/**
|
|
1062
|
+
* Configure a main-menu page from XML.
|
|
1063
|
+
*
|
|
1064
|
+
* @param page_id - Page id.
|
|
1065
|
+
* @param xml - XML file name.
|
|
1066
|
+
* @param selector - XML selector.
|
|
1067
|
+
*/
|
|
368
1068
|
public SetPage(page_id: TXR_MMShniaga_page, xml: string, selector: string): void;
|
|
369
1069
|
|
|
1070
|
+
/**
|
|
1071
|
+
* Show or hide the menu magnifier.
|
|
1072
|
+
*
|
|
1073
|
+
* @param visible - Whether magnifier should be visible.
|
|
1074
|
+
*/
|
|
370
1075
|
public SetVisibleMagnifier(visible: boolean): void;
|
|
371
1076
|
}
|
|
372
1077
|
|
|
@@ -376,156 +1081,371 @@ declare module "xray16" {
|
|
|
376
1081
|
export type TXR_MMShniaga_page = EnumeratedStaticsValues<typeof CUIMMShniaga>;
|
|
377
1082
|
|
|
378
1083
|
/**
|
|
1084
|
+
* UI binding for `CUIMapInfo`.
|
|
1085
|
+
*
|
|
379
1086
|
* @source C++ class CUIMapInfo : CUIWindow
|
|
380
1087
|
* @customConstructor CUIMapInfo
|
|
381
1088
|
* @group xr_ui_interface
|
|
382
1089
|
*/
|
|
383
1090
|
export class CUIMapInfo extends CUIWindow {
|
|
384
|
-
|
|
1091
|
+
/**
|
|
1092
|
+
* Load map metadata for display.
|
|
1093
|
+
*
|
|
1094
|
+
* @param map_name - Map name.
|
|
1095
|
+
* @param map_version - Map version.
|
|
1096
|
+
*/
|
|
1097
|
+
public InitMap(map_name: string, map_version: string): void;
|
|
385
1098
|
}
|
|
386
1099
|
|
|
387
1100
|
/**
|
|
1101
|
+
* UI binding for `CUIMapList`.
|
|
1102
|
+
*
|
|
388
1103
|
* @source C++ class CUIMapList : CUIWindow
|
|
389
1104
|
* @customConstructor CUIMapList
|
|
390
1105
|
* @group xr_ui_interface
|
|
391
1106
|
*/
|
|
392
1107
|
export class CUIMapList extends CUIWindow {
|
|
1108
|
+
/**
|
|
1109
|
+
* Clear map entries.
|
|
1110
|
+
*/
|
|
393
1111
|
public ClearList(): void;
|
|
394
1112
|
|
|
1113
|
+
/**
|
|
1114
|
+
* Build a command-line value for the selected map settings.
|
|
1115
|
+
*
|
|
1116
|
+
* @param value - Base command-line value.
|
|
1117
|
+
* @returns Command-line value.
|
|
1118
|
+
*/
|
|
395
1119
|
public GetCommandLine<T extends string = string>(value: string): T;
|
|
396
1120
|
|
|
1121
|
+
/**
|
|
1122
|
+
* @returns Current multiplayer game type.
|
|
1123
|
+
*/
|
|
397
1124
|
public GetCurGameType(): TXR_GAME_TYPE;
|
|
398
1125
|
|
|
1126
|
+
/**
|
|
1127
|
+
* @returns Whether the map list has no entries.
|
|
1128
|
+
*/
|
|
399
1129
|
public IsEmpty(): boolean;
|
|
400
1130
|
|
|
1131
|
+
/**
|
|
1132
|
+
* Load available maps.
|
|
1133
|
+
*/
|
|
401
1134
|
public LoadMapList(): void;
|
|
402
1135
|
|
|
1136
|
+
/**
|
|
1137
|
+
* Refresh list state after game mode changes.
|
|
1138
|
+
*/
|
|
403
1139
|
public OnModeChange(): void;
|
|
404
1140
|
|
|
1141
|
+
/**
|
|
1142
|
+
* Save current map list settings.
|
|
1143
|
+
*/
|
|
405
1144
|
public SaveMapList(): void;
|
|
406
1145
|
|
|
1146
|
+
/**
|
|
1147
|
+
* Set the map info panel updated by this list.
|
|
1148
|
+
*
|
|
1149
|
+
* @param info - Map info control.
|
|
1150
|
+
*/
|
|
407
1151
|
public SetMapInfo(info: CUIMapInfo): void;
|
|
408
1152
|
|
|
1153
|
+
/**
|
|
1154
|
+
* Set the map preview image control.
|
|
1155
|
+
*
|
|
1156
|
+
* @param picture - Static image control.
|
|
1157
|
+
*/
|
|
409
1158
|
public SetMapPic(picture: CUIStatic): void;
|
|
410
1159
|
|
|
1160
|
+
/**
|
|
1161
|
+
* Set game mode selector control.
|
|
1162
|
+
*
|
|
1163
|
+
* @param modeSelector - Mode selector.
|
|
1164
|
+
*/
|
|
411
1165
|
public SetModeSelector(modeSelector: CUISpinText): void;
|
|
412
1166
|
|
|
1167
|
+
/**
|
|
1168
|
+
* Set server launch parameters.
|
|
1169
|
+
*
|
|
1170
|
+
* @param params - Server parameter string.
|
|
1171
|
+
*/
|
|
413
1172
|
public SetServerParams(params: string): void;
|
|
414
1173
|
|
|
1174
|
+
/**
|
|
1175
|
+
* Set weather selector control.
|
|
1176
|
+
*
|
|
1177
|
+
* @param selector - Weather selector.
|
|
1178
|
+
*/
|
|
415
1179
|
public SetWeatherSelector(selector: CUIComboBox): void;
|
|
416
1180
|
|
|
1181
|
+
/**
|
|
1182
|
+
* Start a dedicated server with selected settings.
|
|
1183
|
+
*/
|
|
417
1184
|
public StartDedicatedServer(): void;
|
|
418
1185
|
}
|
|
419
1186
|
|
|
420
1187
|
/**
|
|
1188
|
+
* UI binding for `CUIMessageBox`.
|
|
1189
|
+
*
|
|
421
1190
|
* @source C++ class CUIMessageBox : CUIStatic
|
|
422
1191
|
* @customConstructor CUIMessageBox
|
|
423
1192
|
* @group xr_ui_interface
|
|
424
1193
|
*/
|
|
425
1194
|
export class CUIMessageBox extends CUIStatic {
|
|
1195
|
+
/**
|
|
1196
|
+
* Initialize message box layout.
|
|
1197
|
+
*
|
|
1198
|
+
* @param value - Message box template name.
|
|
1199
|
+
* @returns Whether initialization succeeded.
|
|
1200
|
+
*/
|
|
426
1201
|
public InitMessageBox(value: string): boolean;
|
|
427
1202
|
|
|
1203
|
+
/**
|
|
1204
|
+
* @returns Password entered in the message box.
|
|
1205
|
+
*/
|
|
428
1206
|
public GetPassword(): string;
|
|
429
1207
|
|
|
1208
|
+
/**
|
|
1209
|
+
* @returns Host entered in the message box.
|
|
1210
|
+
*/
|
|
430
1211
|
public GetHost(): string;
|
|
431
1212
|
}
|
|
432
1213
|
|
|
433
1214
|
/**
|
|
1215
|
+
* UI binding for `CUIMessageBoxEx`.
|
|
1216
|
+
*
|
|
434
1217
|
* @source C++ class CUIMessageBoxEx : CUIDialogWnd
|
|
435
1218
|
* @customConstructor CUIMessageBoxEx
|
|
436
1219
|
* @group xr_ui_interface
|
|
437
1220
|
*/
|
|
438
1221
|
export class CUIMessageBoxEx extends CUIDialogWnd {
|
|
1222
|
+
/**
|
|
1223
|
+
* Initialize message box dialog layout.
|
|
1224
|
+
*
|
|
1225
|
+
* @param selector - Message box template selector.
|
|
1226
|
+
*/
|
|
439
1227
|
public InitMessageBox(selector: string): void;
|
|
440
1228
|
|
|
1229
|
+
/**
|
|
1230
|
+
* Set message text.
|
|
1231
|
+
*
|
|
1232
|
+
* @param text - Text to show.
|
|
1233
|
+
*/
|
|
441
1234
|
public SetText(text: string): void;
|
|
442
1235
|
|
|
1236
|
+
/**
|
|
1237
|
+
* @returns Password entered in the dialog.
|
|
1238
|
+
*/
|
|
443
1239
|
public GetPassword(): string;
|
|
444
1240
|
|
|
1241
|
+
/**
|
|
1242
|
+
* @returns Host entered in the dialog.
|
|
1243
|
+
*/
|
|
445
1244
|
public GetHost(): string;
|
|
446
1245
|
}
|
|
447
1246
|
|
|
448
1247
|
/**
|
|
1248
|
+
* UI binding for `CUIProgressBar`.
|
|
1249
|
+
*
|
|
449
1250
|
* @source C++ class CUIProgressBar : CUIWindow
|
|
450
1251
|
* @customConstructor CUIProgressBar
|
|
451
1252
|
* @group xr_ui_interface
|
|
452
1253
|
*/
|
|
453
1254
|
export class CUIProgressBar extends CUIWindow {
|
|
1255
|
+
/**
|
|
1256
|
+
* @returns Progress range maximum.
|
|
1257
|
+
*/
|
|
454
1258
|
public GetRange_max(): f32;
|
|
455
1259
|
|
|
1260
|
+
/**
|
|
1261
|
+
* @returns Progress range minimum.
|
|
1262
|
+
*/
|
|
456
1263
|
public GetRange_min(): f32;
|
|
457
1264
|
|
|
1265
|
+
/**
|
|
1266
|
+
* Set progress value.
|
|
1267
|
+
*
|
|
1268
|
+
* @param position - Progress position.
|
|
1269
|
+
*/
|
|
458
1270
|
public SetProgressPos(position: f32): void;
|
|
459
1271
|
|
|
1272
|
+
/**
|
|
1273
|
+
* @returns Current progress value.
|
|
1274
|
+
*/
|
|
460
1275
|
public GetProgressPos(): f32;
|
|
461
1276
|
}
|
|
462
1277
|
|
|
463
1278
|
/**
|
|
1279
|
+
* UI binding for `CUIPropertiesBox`.
|
|
1280
|
+
*
|
|
464
1281
|
* @source C++ class CUIPropertiesBox : CUIFrameWindow
|
|
465
1282
|
* @customConstructor CUIPropertiesBox
|
|
466
1283
|
* @group xr_ui_interface
|
|
467
1284
|
*/
|
|
468
1285
|
export class CUIPropertiesBox extends CUIFrameWindow {
|
|
1286
|
+
/**
|
|
1287
|
+
* Add a selectable property item.
|
|
1288
|
+
*
|
|
1289
|
+
* @param id - Item id.
|
|
1290
|
+
*/
|
|
469
1291
|
public AddItem(id: string): void;
|
|
1292
|
+
|
|
1293
|
+
/**
|
|
1294
|
+
* Resize the box to fit its items.
|
|
1295
|
+
*/
|
|
470
1296
|
public AutoUpdateSize(): void;
|
|
1297
|
+
|
|
1298
|
+
/**
|
|
1299
|
+
* Remove an item by index.
|
|
1300
|
+
*
|
|
1301
|
+
* @param index - Item index.
|
|
1302
|
+
*/
|
|
471
1303
|
public RemoveItem(index: u32): void;
|
|
1304
|
+
|
|
1305
|
+
/**
|
|
1306
|
+
* Remove all property items.
|
|
1307
|
+
*/
|
|
472
1308
|
public RemoveAll(): void;
|
|
1309
|
+
|
|
1310
|
+
/**
|
|
1311
|
+
* Hide the properties box.
|
|
1312
|
+
*/
|
|
473
1313
|
public Hide(): void;
|
|
474
1314
|
|
|
1315
|
+
/**
|
|
1316
|
+
* Show or hide the properties box.
|
|
1317
|
+
*
|
|
1318
|
+
* @param show - Whether the box should be visible.
|
|
1319
|
+
*/
|
|
475
1320
|
public Show(show: boolean): void;
|
|
476
1321
|
|
|
1322
|
+
/**
|
|
1323
|
+
* Show the properties box near a screen point.
|
|
1324
|
+
*
|
|
1325
|
+
* @param int1 - X position.
|
|
1326
|
+
* @param int2 - Y position.
|
|
1327
|
+
*/
|
|
477
1328
|
public Show(int1: i32, int2: i32): void;
|
|
478
1329
|
|
|
1330
|
+
/**
|
|
1331
|
+
* @returns Currently selected property item.
|
|
1332
|
+
*/
|
|
479
1333
|
public GetSelectedItem(): CUIListBoxItem;
|
|
480
1334
|
|
|
1335
|
+
/**
|
|
1336
|
+
* Initialize properties box geometry.
|
|
1337
|
+
*
|
|
1338
|
+
* @param position - Box position.
|
|
1339
|
+
* @param size - Box size.
|
|
1340
|
+
*/
|
|
481
1341
|
public InitPropertiesBox(position: vector2, size: vector2): void;
|
|
482
1342
|
}
|
|
483
1343
|
|
|
484
1344
|
/**
|
|
1345
|
+
* UI binding for `CUIVersionList`.
|
|
1346
|
+
*
|
|
485
1347
|
* @source C++ class CUIVersionList : CUIWindow
|
|
486
1348
|
* @customConstructor CUIVersionList
|
|
487
1349
|
* @group xr_ui_interface
|
|
488
1350
|
*/
|
|
489
1351
|
export class CUIVersionList {
|
|
1352
|
+
/**
|
|
1353
|
+
* Create a version list control.
|
|
1354
|
+
*/
|
|
490
1355
|
public constructor();
|
|
491
1356
|
|
|
1357
|
+
/**
|
|
1358
|
+
* @returns Number of available versions.
|
|
1359
|
+
*/
|
|
492
1360
|
public GetItemsCount(): u64;
|
|
493
1361
|
|
|
1362
|
+
/**
|
|
1363
|
+
* Switch game data to the selected version.
|
|
1364
|
+
*/
|
|
494
1365
|
public SwitchToSelectedVersion(): void;
|
|
495
1366
|
|
|
1367
|
+
/**
|
|
1368
|
+
* @returns Description of the selected version.
|
|
1369
|
+
*/
|
|
496
1370
|
public GetCurrentVersionDescr(): string;
|
|
497
1371
|
|
|
1372
|
+
/**
|
|
1373
|
+
* @returns Name of the selected version.
|
|
1374
|
+
*/
|
|
498
1375
|
public GetCurrentVersionName(): string;
|
|
499
1376
|
}
|
|
500
1377
|
|
|
501
1378
|
/**
|
|
1379
|
+
* UI binding for `CUIScrollView`.
|
|
1380
|
+
*
|
|
502
1381
|
* @source C++ class CUIScrollView : CUIWindow
|
|
503
1382
|
* @customConstructor CUIScrollView
|
|
504
1383
|
* @group xr_ui_interface
|
|
505
1384
|
*/
|
|
506
1385
|
export class CUIScrollView extends CUIWindow {
|
|
1386
|
+
/**
|
|
1387
|
+
* Set scroll position.
|
|
1388
|
+
*
|
|
1389
|
+
* @param position - Scroll position.
|
|
1390
|
+
*/
|
|
507
1391
|
public SetScrollPos(position: i32): void;
|
|
508
1392
|
|
|
1393
|
+
/**
|
|
1394
|
+
* Remove a child window from the scroll view.
|
|
1395
|
+
*
|
|
1396
|
+
* @param window - Window to remove.
|
|
1397
|
+
*/
|
|
509
1398
|
public RemoveWindow(window: CUIWindow): void;
|
|
510
1399
|
|
|
1400
|
+
/**
|
|
1401
|
+
* Scroll to the beginning.
|
|
1402
|
+
*/
|
|
511
1403
|
public ScrollToBegin(): void;
|
|
512
1404
|
|
|
1405
|
+
/**
|
|
1406
|
+
* @returns Current scroll position.
|
|
1407
|
+
*/
|
|
513
1408
|
public GetCurrentScrollPos(): i32;
|
|
514
1409
|
|
|
1410
|
+
/**
|
|
1411
|
+
* Add a window to the scroll view.
|
|
1412
|
+
*
|
|
1413
|
+
* @param window - Window to add.
|
|
1414
|
+
* @param value - Whether layout should be recalculated.
|
|
1415
|
+
*/
|
|
515
1416
|
public AddWindow(window: CUIWindow, value: boolean): void;
|
|
516
1417
|
|
|
1418
|
+
/**
|
|
1419
|
+
* @returns Maximum scroll position.
|
|
1420
|
+
*/
|
|
517
1421
|
public GetMaxScrollPos(): i32;
|
|
518
1422
|
|
|
1423
|
+
/**
|
|
1424
|
+
* @returns Minimum scroll position.
|
|
1425
|
+
*/
|
|
519
1426
|
public GetMinScrollPos(): i32;
|
|
520
1427
|
|
|
1428
|
+
/**
|
|
1429
|
+
* Scroll to the end.
|
|
1430
|
+
*/
|
|
521
1431
|
public ScrollToEnd(): void;
|
|
522
1432
|
|
|
1433
|
+
/**
|
|
1434
|
+
* Remove all child windows.
|
|
1435
|
+
*/
|
|
523
1436
|
public Clear(): void;
|
|
524
1437
|
|
|
1438
|
+
/**
|
|
1439
|
+
* Keep scrollbar visibility fixed.
|
|
1440
|
+
*
|
|
1441
|
+
* @param fixed - Whether scrollbar state is fixed.
|
|
1442
|
+
*/
|
|
525
1443
|
public SetFixedScrollBar(fixed: boolean): void;
|
|
526
1444
|
}
|
|
527
1445
|
|
|
528
1446
|
/**
|
|
1447
|
+
* UI binding for `CUISleepStatic`.
|
|
1448
|
+
*
|
|
529
1449
|
* @source C++ class CUISleepStatic : CUIStatic
|
|
530
1450
|
* @customConstructor CUISleepStatic
|
|
531
1451
|
* @group xr_ui_interface
|
|
@@ -533,6 +1453,8 @@ declare module "xray16" {
|
|
|
533
1453
|
export class CUISleepStatic extends CUIStatic {}
|
|
534
1454
|
|
|
535
1455
|
/**
|
|
1456
|
+
* UI binding for `CUISpinFlt`.
|
|
1457
|
+
*
|
|
536
1458
|
* @source C++ class CUISpinFlt : CUICustomSpin
|
|
537
1459
|
* @customConstructor CUISpinFlt
|
|
538
1460
|
* @group xr_ui_interface
|
|
@@ -540,6 +1462,8 @@ declare module "xray16" {
|
|
|
540
1462
|
export class CUISpinFlt extends CUICustomSpin {}
|
|
541
1463
|
|
|
542
1464
|
/**
|
|
1465
|
+
* UI binding for `CUISpinNum`.
|
|
1466
|
+
*
|
|
543
1467
|
* @source C++ class CUISpinNum : CUICustomSpin
|
|
544
1468
|
* @customConstructor CUISpinNum
|
|
545
1469
|
* @group xr_ui_interface
|
|
@@ -547,6 +1471,8 @@ declare module "xray16" {
|
|
|
547
1471
|
export class CUISpinNum extends CUICustomSpin {}
|
|
548
1472
|
|
|
549
1473
|
/**
|
|
1474
|
+
* UI binding for `CUISpinText`.
|
|
1475
|
+
*
|
|
550
1476
|
* @source C++ class CUISpinText : CUICustomSpin
|
|
551
1477
|
* @customConstructor CUISpinText
|
|
552
1478
|
* @group xr_ui_interface
|
|
@@ -554,67 +1480,190 @@ declare module "xray16" {
|
|
|
554
1480
|
export class CUISpinText extends CUICustomSpin {}
|
|
555
1481
|
|
|
556
1482
|
/**
|
|
1483
|
+
* UI binding for `CUIStatic`.
|
|
1484
|
+
*
|
|
557
1485
|
* @source C++ class CUIStatic : CUIWindow
|
|
558
1486
|
* @customConstructor CUIStatic
|
|
559
1487
|
* @group xr_ui_interface
|
|
560
1488
|
*/
|
|
561
1489
|
export class CUIStatic extends CUIWindow {
|
|
1490
|
+
/**
|
|
1491
|
+
* @returns Texture color.
|
|
1492
|
+
*/
|
|
562
1493
|
public GetColor(): u32;
|
|
563
1494
|
|
|
1495
|
+
/**
|
|
1496
|
+
* Set texture color.
|
|
1497
|
+
*
|
|
1498
|
+
* @param color - ARGB color.
|
|
1499
|
+
*/
|
|
564
1500
|
public SetColor(color: u32): void;
|
|
565
1501
|
|
|
1502
|
+
/**
|
|
1503
|
+
* @returns Text line controller.
|
|
1504
|
+
*/
|
|
566
1505
|
public TextControl(): CUILines;
|
|
567
1506
|
|
|
1507
|
+
/**
|
|
1508
|
+
* @returns Texture rectangle.
|
|
1509
|
+
*/
|
|
568
1510
|
public GetTextureRect(): Frect;
|
|
569
1511
|
|
|
1512
|
+
/**
|
|
1513
|
+
* @returns Whether texture stretching is enabled.
|
|
1514
|
+
*/
|
|
570
1515
|
public GetStretchTexture(): boolean;
|
|
571
1516
|
|
|
1517
|
+
/**
|
|
1518
|
+
* Enable or disable texture stretching.
|
|
1519
|
+
*
|
|
1520
|
+
* @param stretch - Whether texture should stretch to the window rect.
|
|
1521
|
+
*/
|
|
572
1522
|
public SetStretchTexture(stretch: boolean): void;
|
|
573
1523
|
|
|
1524
|
+
/**
|
|
1525
|
+
* Set source texture rectangle.
|
|
1526
|
+
*
|
|
1527
|
+
* @param frect - Texture rectangle.
|
|
1528
|
+
*/
|
|
574
1529
|
public SetTextureRect(frect: Frect): void;
|
|
575
1530
|
|
|
1531
|
+
/**
|
|
1532
|
+
* Assign texture by atlas id.
|
|
1533
|
+
*
|
|
1534
|
+
* @param texture - Texture id.
|
|
1535
|
+
*/
|
|
576
1536
|
public InitTexture(texture: string): void;
|
|
577
1537
|
|
|
578
|
-
|
|
579
|
-
|
|
1538
|
+
/**
|
|
1539
|
+
* Set text color from color channels.
|
|
1540
|
+
*
|
|
1541
|
+
* @param a - Alpha channel.
|
|
1542
|
+
* @param r - Red channel.
|
|
1543
|
+
* @param g - Green channel.
|
|
1544
|
+
* @param b - Blue channel.
|
|
1545
|
+
*/
|
|
1546
|
+
public SetTextColor(a: i32, r: i32, g: i32, b: i32): void;
|
|
1547
|
+
|
|
1548
|
+
/**
|
|
1549
|
+
* Set texture color.
|
|
1550
|
+
*
|
|
1551
|
+
* @param color - ARGB color.
|
|
1552
|
+
*/
|
|
580
1553
|
public SetTextureColor(color: u32): void;
|
|
581
1554
|
|
|
1555
|
+
/**
|
|
1556
|
+
* @returns Texture color.
|
|
1557
|
+
*/
|
|
582
1558
|
public GetTextureColor(): u32;
|
|
583
1559
|
|
|
1560
|
+
/**
|
|
1561
|
+
* Set heading angle.
|
|
1562
|
+
*
|
|
1563
|
+
* @param number - Heading angle.
|
|
1564
|
+
*/
|
|
584
1565
|
public SetHeading(number: f32): void;
|
|
585
1566
|
|
|
1567
|
+
/**
|
|
1568
|
+
* Set translated string-table text.
|
|
1569
|
+
*
|
|
1570
|
+
* @param string - String table id.
|
|
1571
|
+
*/
|
|
586
1572
|
public SetTextST(string: string): void;
|
|
587
1573
|
|
|
1574
|
+
/**
|
|
1575
|
+
* Set text alignment.
|
|
1576
|
+
*
|
|
1577
|
+
* @param align - Alignment id.
|
|
1578
|
+
*/
|
|
588
1579
|
public SetTextAlign(align: u32): void;
|
|
589
1580
|
|
|
1581
|
+
/**
|
|
1582
|
+
* @returns Text alignment id.
|
|
1583
|
+
*/
|
|
590
1584
|
public GetTextAlign(): u32;
|
|
591
1585
|
|
|
1586
|
+
/**
|
|
1587
|
+
* @returns Current text.
|
|
1588
|
+
*/
|
|
592
1589
|
public GetText(): string;
|
|
593
1590
|
|
|
1591
|
+
/**
|
|
1592
|
+
* Assign texture and shader by name.
|
|
1593
|
+
*
|
|
1594
|
+
* @param first - Texture id.
|
|
1595
|
+
* @param second - Shader id.
|
|
1596
|
+
*/
|
|
594
1597
|
public InitTextureEx(first: string, second: string): void;
|
|
595
1598
|
|
|
1599
|
+
/**
|
|
1600
|
+
* Set text X offset.
|
|
1601
|
+
*
|
|
1602
|
+
* @param x - X offset.
|
|
1603
|
+
*/
|
|
596
1604
|
public SetTextX(x: f32): void;
|
|
597
1605
|
|
|
1606
|
+
/**
|
|
1607
|
+
* Set text Y offset.
|
|
1608
|
+
*
|
|
1609
|
+
* @param x - Y offset.
|
|
1610
|
+
*/
|
|
598
1611
|
public SetTextY(x: f32): void;
|
|
599
1612
|
|
|
600
|
-
|
|
1613
|
+
/**
|
|
1614
|
+
* @returns Text Y offset.
|
|
1615
|
+
*/
|
|
1616
|
+
public GetTextY(): f32;
|
|
601
1617
|
|
|
1618
|
+
/**
|
|
1619
|
+
* @returns Text X offset.
|
|
1620
|
+
*/
|
|
602
1621
|
public GetTextX(): f32;
|
|
603
1622
|
|
|
1623
|
+
/**
|
|
1624
|
+
* Set texture drawing offset.
|
|
1625
|
+
*
|
|
1626
|
+
* @param x - X offset.
|
|
1627
|
+
* @param y - Y offset.
|
|
1628
|
+
*/
|
|
604
1629
|
public SetTextureOffset(x: f32, y: f32): void;
|
|
605
1630
|
|
|
1631
|
+
/**
|
|
1632
|
+
* Configure text ellipsis.
|
|
1633
|
+
*
|
|
1634
|
+
* @param a - Ellipsis mode.
|
|
1635
|
+
* @param b - Indent.
|
|
1636
|
+
*/
|
|
606
1637
|
public SetElipsis(a: i32, b: i32): void;
|
|
607
1638
|
|
|
1639
|
+
/**
|
|
1640
|
+
* @returns Heading angle.
|
|
1641
|
+
*/
|
|
608
1642
|
public GetHeading(): f32;
|
|
609
1643
|
|
|
1644
|
+
/**
|
|
1645
|
+
* Set raw text.
|
|
1646
|
+
*
|
|
1647
|
+
* @param text - Text value.
|
|
1648
|
+
*/
|
|
610
1649
|
public SetText(text: string): void;
|
|
611
1650
|
|
|
1651
|
+
/**
|
|
1652
|
+
* @returns Original texture rectangle.
|
|
1653
|
+
*/
|
|
612
1654
|
public GetOriginalRect(): Frect;
|
|
613
1655
|
|
|
1656
|
+
/**
|
|
1657
|
+
* Set original texture rectangle.
|
|
1658
|
+
*
|
|
1659
|
+
* @param frect - Original rectangle.
|
|
1660
|
+
*/
|
|
614
1661
|
public SetOriginalRect(frect: Frect): void;
|
|
615
1662
|
}
|
|
616
1663
|
|
|
617
1664
|
/**
|
|
1665
|
+
* UI binding for `CUITabButton`.
|
|
1666
|
+
*
|
|
618
1667
|
* @source C++ class CUITabButton : CUIButton
|
|
619
1668
|
* @customConstructor CUITabButton
|
|
620
1669
|
* @group xr_ui_interface
|
|
@@ -622,186 +1671,549 @@ declare module "xray16" {
|
|
|
622
1671
|
export class CUITabButton extends CUIButton {}
|
|
623
1672
|
|
|
624
1673
|
/**
|
|
1674
|
+
* UI binding for `CUITabControl`.
|
|
1675
|
+
*
|
|
625
1676
|
* @source C++ class CUITabControl : CUIWindow
|
|
626
1677
|
* @customConstructor CUITabControl
|
|
627
1678
|
* @group xr_ui_interface
|
|
1679
|
+
*
|
|
1680
|
+
* @remarks
|
|
1681
|
+
* String ids are tab ids from XML or script. Numeric indices follow the current visual order.
|
|
628
1682
|
*/
|
|
629
1683
|
export class CUITabControl extends CUIWindow {
|
|
1684
|
+
/**
|
|
1685
|
+
* @returns Active tab id.
|
|
1686
|
+
*/
|
|
630
1687
|
public GetActiveId(): string;
|
|
631
1688
|
|
|
1689
|
+
/**
|
|
1690
|
+
* Activate a tab by id.
|
|
1691
|
+
*
|
|
1692
|
+
* @param id - Tab id.
|
|
1693
|
+
*/
|
|
632
1694
|
public SetActiveTab(id: string): void;
|
|
633
1695
|
|
|
1696
|
+
/**
|
|
1697
|
+
* Activate a tab by index.
|
|
1698
|
+
*
|
|
1699
|
+
* @param id - Tab index.
|
|
1700
|
+
*/
|
|
634
1701
|
public SetActiveTab(id: u32): void;
|
|
635
1702
|
|
|
1703
|
+
/**
|
|
1704
|
+
* @returns Number of tabs.
|
|
1705
|
+
*/
|
|
636
1706
|
public GetTabsCount(): u32;
|
|
637
1707
|
|
|
1708
|
+
/**
|
|
1709
|
+
* Get a tab button by id.
|
|
1710
|
+
*
|
|
1711
|
+
* @param id - Tab id.
|
|
1712
|
+
* @returns Tab button.
|
|
1713
|
+
*/
|
|
638
1714
|
public GetButtonById(id: string): CUITabButton;
|
|
639
1715
|
|
|
1716
|
+
/**
|
|
1717
|
+
* Remove all tabs.
|
|
1718
|
+
*/
|
|
640
1719
|
public RemoveAll(): void;
|
|
641
1720
|
|
|
1721
|
+
/**
|
|
1722
|
+
* Add an existing tab button and transfer it to the control.
|
|
1723
|
+
*
|
|
1724
|
+
* @remarks
|
|
1725
|
+
* The tab control owns the button after it is added.
|
|
1726
|
+
*
|
|
1727
|
+
* @param item - Tab button.
|
|
1728
|
+
*/
|
|
642
1729
|
public AddItem(item: CUITabButton): void;
|
|
643
1730
|
|
|
1731
|
+
/**
|
|
1732
|
+
* Add a tab from texture bounds.
|
|
1733
|
+
*
|
|
1734
|
+
* @param id - Tab id.
|
|
1735
|
+
* @param name - Texture or visual name.
|
|
1736
|
+
* @param top_left - Top-left bounds.
|
|
1737
|
+
* @param bot_right - Bottom-right bounds.
|
|
1738
|
+
*/
|
|
644
1739
|
public AddItem(id: string, name: string, top_left: vector2, bot_right: vector2): void;
|
|
645
1740
|
|
|
646
|
-
|
|
1741
|
+
/**
|
|
1742
|
+
* Add a tab from numeric bounds.
|
|
1743
|
+
*
|
|
1744
|
+
* @param id - Tab id.
|
|
1745
|
+
* @param name - Texture or visual name.
|
|
1746
|
+
* @param x - X position.
|
|
1747
|
+
* @param y - Y position.
|
|
1748
|
+
* @param width - Tab width.
|
|
1749
|
+
* @param height - Tab height.
|
|
1750
|
+
*/
|
|
1751
|
+
public AddItem(id: string, name: string, x: f32, y: f32, width: f32, height: f32): void;
|
|
1752
|
+
|
|
1753
|
+
/**
|
|
1754
|
+
* Remove a tab by index.
|
|
1755
|
+
*
|
|
1756
|
+
* @param index - Tab index.
|
|
1757
|
+
*/
|
|
1758
|
+
public RemoveItem(index: u32): void;
|
|
647
1759
|
|
|
1760
|
+
/**
|
|
1761
|
+
* Remove a tab by id.
|
|
1762
|
+
*
|
|
1763
|
+
* @param id - Tab id.
|
|
1764
|
+
*/
|
|
1765
|
+
public RemoveItemById(id: string): void;
|
|
1766
|
+
|
|
1767
|
+
/**
|
|
1768
|
+
* Get a tab button by index.
|
|
1769
|
+
*
|
|
1770
|
+
* @param index - Tab index.
|
|
1771
|
+
* @returns Tab button.
|
|
1772
|
+
*/
|
|
648
1773
|
public GetButtonByIndex(index: u32): CUITabButton;
|
|
649
1774
|
|
|
1775
|
+
/**
|
|
1776
|
+
* Activate a new tab by index.
|
|
1777
|
+
*
|
|
1778
|
+
* @param index - Tab index.
|
|
1779
|
+
*/
|
|
650
1780
|
public SetNewActiveTab(index: u32): void;
|
|
651
1781
|
|
|
1782
|
+
/**
|
|
1783
|
+
* @returns Active tab index.
|
|
1784
|
+
*/
|
|
652
1785
|
public GetActiveIndex(): i32;
|
|
653
1786
|
}
|
|
654
1787
|
|
|
655
1788
|
/**
|
|
1789
|
+
* UI binding for `CUITextWnd`.
|
|
1790
|
+
*
|
|
656
1791
|
* @source C++ class CUITextWnd : CUIWindow
|
|
657
1792
|
* @customConstructor CUITextWnd
|
|
658
1793
|
* @group xr_ui_interface
|
|
659
1794
|
*/
|
|
660
1795
|
export class CUITextWnd extends CUIWindow {
|
|
1796
|
+
/**
|
|
1797
|
+
* Set text drawing offset.
|
|
1798
|
+
*
|
|
1799
|
+
* @param x - X offset.
|
|
1800
|
+
* @param y - Y offset.
|
|
1801
|
+
*/
|
|
661
1802
|
public SetTextOffset(x: f32, y: f32): void;
|
|
662
1803
|
|
|
1804
|
+
/**
|
|
1805
|
+
* Set raw text.
|
|
1806
|
+
*
|
|
1807
|
+
* @param text - Text value.
|
|
1808
|
+
*/
|
|
663
1809
|
public SetText(text: string): void;
|
|
664
1810
|
|
|
1811
|
+
/**
|
|
1812
|
+
* Set horizontal text alignment.
|
|
1813
|
+
*
|
|
1814
|
+
* @param align - Font alignment.
|
|
1815
|
+
*/
|
|
665
1816
|
public SetTextAlignment(align: TXR_CGameFont_alignment): void;
|
|
666
1817
|
|
|
1818
|
+
/**
|
|
1819
|
+
* Enable or disable complex text layout.
|
|
1820
|
+
*
|
|
1821
|
+
* @param complex - Whether complex mode is enabled.
|
|
1822
|
+
*/
|
|
667
1823
|
public SetTextComplexMode(complex: boolean): void;
|
|
668
1824
|
|
|
1825
|
+
/**
|
|
1826
|
+
* @returns Current text.
|
|
1827
|
+
*/
|
|
669
1828
|
public GetText(): string;
|
|
670
1829
|
|
|
1830
|
+
/**
|
|
1831
|
+
* @returns Text color.
|
|
1832
|
+
*/
|
|
671
1833
|
public GetTextColor(): u32;
|
|
672
1834
|
|
|
1835
|
+
/**
|
|
1836
|
+
* Set text color.
|
|
1837
|
+
*
|
|
1838
|
+
* @param color - ARGB color.
|
|
1839
|
+
*/
|
|
673
1840
|
public SetTextColor(color: u32): void;
|
|
674
1841
|
|
|
1842
|
+
/**
|
|
1843
|
+
* Set translated string-table text.
|
|
1844
|
+
*
|
|
1845
|
+
* @param text - String table id.
|
|
1846
|
+
*/
|
|
675
1847
|
public SetTextST(text: string): void;
|
|
676
1848
|
|
|
1849
|
+
/**
|
|
1850
|
+
* Resize height to fit current text.
|
|
1851
|
+
*/
|
|
677
1852
|
public AdjustHeightToText(): void;
|
|
678
1853
|
|
|
1854
|
+
/**
|
|
1855
|
+
* Resize width to fit current text.
|
|
1856
|
+
*/
|
|
679
1857
|
public AdjustWidthToText(): void;
|
|
680
1858
|
|
|
1859
|
+
/**
|
|
1860
|
+
* Enable or disable ellipsis.
|
|
1861
|
+
*
|
|
1862
|
+
* @param value - Whether long text should be ellipsized.
|
|
1863
|
+
*/
|
|
681
1864
|
public SetEllipsis(value: boolean): void;
|
|
682
1865
|
|
|
1866
|
+
/**
|
|
1867
|
+
* Set vertical text alignment.
|
|
1868
|
+
*
|
|
1869
|
+
* @param alignment - Font alignment.
|
|
1870
|
+
*/
|
|
683
1871
|
public SetVTextAlignment(alignment: TXR_CGameFont_alignment): void;
|
|
684
1872
|
}
|
|
685
1873
|
|
|
686
1874
|
/**
|
|
1875
|
+
* UI binding for `CUITrackBar`.
|
|
1876
|
+
*
|
|
687
1877
|
* @source C++ class CUITrackBar : CUIWindow
|
|
688
1878
|
* @customConstructor CUITrackBar
|
|
689
1879
|
* @group xr_ui_interface
|
|
690
1880
|
*/
|
|
691
1881
|
export class CUITrackBar extends CUIWindow {
|
|
1882
|
+
/**
|
|
1883
|
+
* Set checked state.
|
|
1884
|
+
*
|
|
1885
|
+
* @param value - New checked state.
|
|
1886
|
+
*/
|
|
692
1887
|
public SetCheck(value: boolean): void;
|
|
693
1888
|
|
|
1889
|
+
/**
|
|
1890
|
+
* Apply current option value.
|
|
1891
|
+
*/
|
|
694
1892
|
public SetCurrentValue(): void;
|
|
695
1893
|
|
|
1894
|
+
/**
|
|
1895
|
+
* Set current float value.
|
|
1896
|
+
*
|
|
1897
|
+
* @param value - New value.
|
|
1898
|
+
*/
|
|
696
1899
|
public SetCurrentValue(value: f32): void;
|
|
697
1900
|
|
|
1901
|
+
/**
|
|
1902
|
+
* Set current integer value.
|
|
1903
|
+
*
|
|
1904
|
+
* @param value - New value.
|
|
1905
|
+
*/
|
|
698
1906
|
public SetCurrentValue(value: i32): void;
|
|
699
1907
|
|
|
1908
|
+
/**
|
|
1909
|
+
* @returns Whether the track bar is checked.
|
|
1910
|
+
*/
|
|
700
1911
|
public GetCheck(): boolean;
|
|
701
1912
|
|
|
1913
|
+
/**
|
|
1914
|
+
* @returns Current integer value.
|
|
1915
|
+
*/
|
|
702
1916
|
public GetIValue(): i32;
|
|
703
1917
|
|
|
1918
|
+
/**
|
|
1919
|
+
* @returns Current float value.
|
|
1920
|
+
*/
|
|
704
1921
|
public GetFValue(): f32;
|
|
705
1922
|
|
|
1923
|
+
/**
|
|
1924
|
+
* Set integer bounds.
|
|
1925
|
+
*
|
|
1926
|
+
* @param min - Minimum value.
|
|
1927
|
+
* @param max - Maximum value.
|
|
1928
|
+
*/
|
|
706
1929
|
public SetOptIBounds(min: i32, max: i32): void;
|
|
707
1930
|
|
|
1931
|
+
/**
|
|
1932
|
+
* Set float bounds.
|
|
1933
|
+
*
|
|
1934
|
+
* @param min - Minimum value.
|
|
1935
|
+
* @param max - Maximum value.
|
|
1936
|
+
* @returns Bound setup result.
|
|
1937
|
+
*/
|
|
708
1938
|
public SetOptFBounds(min: f32, max: f32): number;
|
|
709
1939
|
}
|
|
710
1940
|
|
|
711
1941
|
/**
|
|
1942
|
+
* UI binding for `CDialogHolder`.
|
|
1943
|
+
*
|
|
712
1944
|
* @source C++ class CDialogHolder
|
|
713
1945
|
* @customConstructor CDialogHolder
|
|
714
1946
|
* @group xr_ui_interface
|
|
1947
|
+
*
|
|
1948
|
+
* @remarks
|
|
1949
|
+
* Manages the dialog render list and input receiver stack. It does not create or own dialog windows.
|
|
715
1950
|
*/
|
|
716
1951
|
export class CDialogHolder {
|
|
1952
|
+
/**
|
|
1953
|
+
* Remove a dialog from rendering.
|
|
1954
|
+
*
|
|
1955
|
+
* @remarks
|
|
1956
|
+
* The holder hides and disables the window, then removes it from the active render list on update.
|
|
1957
|
+
*
|
|
1958
|
+
* @param window - Dialog window.
|
|
1959
|
+
*/
|
|
717
1960
|
public RemoveDialogToRender(window: CUIWindow): void;
|
|
718
1961
|
|
|
1962
|
+
/**
|
|
1963
|
+
* Add a dialog to rendering.
|
|
1964
|
+
*
|
|
1965
|
+
* @remarks
|
|
1966
|
+
* The holder shows the window and skips duplicate active entries.
|
|
1967
|
+
*
|
|
1968
|
+
* @param window - Dialog window.
|
|
1969
|
+
*/
|
|
719
1970
|
public AddDialogToRender(window: CUIWindow): void;
|
|
720
1971
|
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
1972
|
+
/**
|
|
1973
|
+
* @returns Current top input receiver, or `null` when no dialog owns input.
|
|
1974
|
+
*/
|
|
1975
|
+
public TopInputReceiver(): CUIDialogWnd | null;
|
|
1976
|
+
|
|
1977
|
+
/**
|
|
1978
|
+
* Set the main input receiver.
|
|
1979
|
+
*
|
|
1980
|
+
* @remarks
|
|
1981
|
+
* Passing `find_remove` removes the matching receiver from the stack. Passing `null` pops the current receiver.
|
|
1982
|
+
*
|
|
1983
|
+
* @param window - Dialog window, or `null` to pop the current receiver.
|
|
1984
|
+
* @param find_remove - Whether to remove the previous receiver if found.
|
|
1985
|
+
*/
|
|
1986
|
+
public SetMainInputReceiver(window: CUIDialogWnd | null, find_remove: boolean): void;
|
|
1987
|
+
|
|
1988
|
+
/**
|
|
1989
|
+
* @returns Current main input receiver, or `null` when no dialog owns input.
|
|
1990
|
+
*/
|
|
1991
|
+
public MainInputReceiver(): CUIDialogWnd | null;
|
|
1992
|
+
|
|
1993
|
+
/**
|
|
1994
|
+
* Start or stop an in-game menu.
|
|
1995
|
+
*
|
|
1996
|
+
* @remarks
|
|
1997
|
+
* This toggles the dialog through the holder, including cursor and HUD indicator handling.
|
|
1998
|
+
*
|
|
1999
|
+
* @param window - Menu window.
|
|
2000
|
+
* @param value - Whether the menu should be active.
|
|
2001
|
+
*/
|
|
2002
|
+
public start_stop_menu(window: CUIDialogWnd, value: boolean): void;
|
|
728
2003
|
}
|
|
729
2004
|
|
|
730
2005
|
/**
|
|
2006
|
+
* UI binding for `StaticDrawableWrapper`.
|
|
2007
|
+
*
|
|
731
2008
|
* @source C++ class StaticDrawableWrapper
|
|
732
2009
|
* @customConstructor StaticDrawableWrapper
|
|
733
2010
|
* @group xr_ui_interface
|
|
2011
|
+
*
|
|
2012
|
+
* @remarks
|
|
2013
|
+
* Created by `CUIGameCustom.AddCustomStatic`. A negative `m_endTime` means the static does not expire by time.
|
|
734
2014
|
*/
|
|
735
2015
|
export class StaticDrawableWrapper {
|
|
2016
|
+
/**
|
|
2017
|
+
* Absolute engine time when this static expires, or a negative value for no time limit.
|
|
2018
|
+
*/
|
|
736
2019
|
public m_endTime: f32;
|
|
737
2020
|
|
|
2021
|
+
/**
|
|
2022
|
+
* Engine-created wrapper for a drawable static.
|
|
2023
|
+
*/
|
|
738
2024
|
private constructor();
|
|
739
2025
|
|
|
2026
|
+
/**
|
|
2027
|
+
* Draw the wrapped static.
|
|
2028
|
+
*/
|
|
740
2029
|
public Draw(): void;
|
|
741
2030
|
|
|
2031
|
+
/**
|
|
2032
|
+
* Update wrapper lifetime and state.
|
|
2033
|
+
*/
|
|
742
2034
|
public Update(): void;
|
|
743
2035
|
|
|
2036
|
+
/**
|
|
2037
|
+
* @returns Whether the wrapper is still active.
|
|
2038
|
+
*/
|
|
744
2039
|
public IsActual(): boolean;
|
|
745
2040
|
|
|
2041
|
+
/**
|
|
2042
|
+
* Set text on the wrapped static.
|
|
2043
|
+
*
|
|
2044
|
+
* @param text - Text value.
|
|
2045
|
+
*/
|
|
746
2046
|
public SetText(text: string): void;
|
|
747
2047
|
|
|
2048
|
+
/**
|
|
2049
|
+
* Destroy the wrapper.
|
|
2050
|
+
*
|
|
2051
|
+
* @remarks
|
|
2052
|
+
* Destroys the wrapped static window. Prefer `CUIGameCustom.RemoveCustomStatic` for HUD-owned statics.
|
|
2053
|
+
*/
|
|
748
2054
|
public destroy(): void;
|
|
749
2055
|
|
|
2056
|
+
/**
|
|
2057
|
+
* @returns Wrapped static window.
|
|
2058
|
+
*/
|
|
750
2059
|
public wnd(): CUIStatic;
|
|
751
2060
|
}
|
|
752
2061
|
|
|
753
2062
|
/**
|
|
2063
|
+
* UI binding for `CUIListWnd`.
|
|
2064
|
+
*
|
|
754
2065
|
* @source C++ class CUIListWnd : CUIWindow
|
|
755
2066
|
* @customConstructor CUIListWnd
|
|
756
2067
|
* @group xr_ui_interface
|
|
2068
|
+
*
|
|
2069
|
+
* @remarks
|
|
2070
|
+
* Items added through the script binding are adopted by the list window.
|
|
757
2071
|
*/
|
|
758
2072
|
export class CUIListWnd extends CUIWindow {
|
|
2073
|
+
/**
|
|
2074
|
+
* Flip list direction vertically.
|
|
2075
|
+
*
|
|
2076
|
+
* @param flip - Whether vertical flip is enabled.
|
|
2077
|
+
*/
|
|
759
2078
|
public SetVertFlip(flip: boolean): void;
|
|
760
2079
|
|
|
2080
|
+
/**
|
|
2081
|
+
* Remove an item by index.
|
|
2082
|
+
*
|
|
2083
|
+
* @param index - Item index.
|
|
2084
|
+
*/
|
|
761
2085
|
public RemoveItem(index: i32): void;
|
|
762
2086
|
|
|
2087
|
+
/**
|
|
2088
|
+
* Scroll to a list position.
|
|
2089
|
+
*
|
|
2090
|
+
* @param position - Scroll position.
|
|
2091
|
+
*/
|
|
763
2092
|
public ScrollToPos(position: i32): void;
|
|
764
2093
|
|
|
2094
|
+
/**
|
|
2095
|
+
* Scroll the selected item into view.
|
|
2096
|
+
*
|
|
2097
|
+
* @param show - Whether selected item should be shown.
|
|
2098
|
+
*/
|
|
765
2099
|
public ShowSelectedItem(show: boolean): void;
|
|
766
2100
|
|
|
2101
|
+
/**
|
|
2102
|
+
* Enable or disable scrollbar.
|
|
2103
|
+
*
|
|
2104
|
+
* @param enable - Whether scrollbar should be enabled.
|
|
2105
|
+
*/
|
|
767
2106
|
public EnableScrollBar(enable: boolean): void;
|
|
768
2107
|
|
|
2108
|
+
/**
|
|
2109
|
+
* Get an item by index.
|
|
2110
|
+
*
|
|
2111
|
+
* @param index - Item index.
|
|
2112
|
+
* @returns List item.
|
|
2113
|
+
*/
|
|
769
2114
|
public GetItem(index: i32): CUIListItem;
|
|
770
2115
|
|
|
2116
|
+
/**
|
|
2117
|
+
* @returns Whether vertical flip is enabled.
|
|
2118
|
+
*/
|
|
771
2119
|
public GetVertFlip(): boolean;
|
|
772
2120
|
|
|
2121
|
+
/**
|
|
2122
|
+
* Set text color for list items.
|
|
2123
|
+
*
|
|
2124
|
+
* @param color - ARGB color.
|
|
2125
|
+
*/
|
|
773
2126
|
public SetTextColor(color: i32): void;
|
|
774
2127
|
|
|
2128
|
+
/**
|
|
2129
|
+
* @returns Selected item index.
|
|
2130
|
+
*/
|
|
775
2131
|
public GetSelectedItem(): i32;
|
|
776
2132
|
|
|
2133
|
+
/**
|
|
2134
|
+
* Scroll to the end.
|
|
2135
|
+
*/
|
|
777
2136
|
public ScrollToEnd(): void;
|
|
778
2137
|
|
|
2138
|
+
/**
|
|
2139
|
+
* Set focused item index.
|
|
2140
|
+
*
|
|
2141
|
+
* @param index - Item index.
|
|
2142
|
+
*/
|
|
779
2143
|
public SetFocusedItem(index: i32): void;
|
|
780
2144
|
|
|
2145
|
+
/**
|
|
2146
|
+
* Activate or deactivate the list.
|
|
2147
|
+
*
|
|
2148
|
+
* @param flag - New active state.
|
|
2149
|
+
*/
|
|
781
2150
|
public ActivateList(flag: boolean): void;
|
|
782
2151
|
|
|
2152
|
+
/**
|
|
2153
|
+
* @returns Number of items.
|
|
2154
|
+
*/
|
|
783
2155
|
public GetSize(): i32;
|
|
784
2156
|
|
|
2157
|
+
/**
|
|
2158
|
+
* @returns Whether scrollbar is enabled.
|
|
2159
|
+
*/
|
|
785
2160
|
public IsScrollBarEnabled(): boolean;
|
|
786
2161
|
|
|
2162
|
+
/**
|
|
2163
|
+
* Scroll to the beginning.
|
|
2164
|
+
*/
|
|
787
2165
|
public ScrollToBegin(): void;
|
|
788
2166
|
|
|
2167
|
+
/**
|
|
2168
|
+
* Remove all items.
|
|
2169
|
+
*/
|
|
789
2170
|
public RemoveAll(): void;
|
|
790
2171
|
|
|
2172
|
+
/**
|
|
2173
|
+
* Add an item and transfer it to the list.
|
|
2174
|
+
*
|
|
2175
|
+
* @remarks
|
|
2176
|
+
* The Lua binding adopts `item`; the list owns it after a successful add.
|
|
2177
|
+
*
|
|
2178
|
+
* @param item - Item to add.
|
|
2179
|
+
* @returns Whether the item was added.
|
|
2180
|
+
*/
|
|
791
2181
|
public AddItem(item: CUIListItem): boolean;
|
|
792
2182
|
|
|
2183
|
+
/**
|
|
2184
|
+
* Set list item height.
|
|
2185
|
+
*
|
|
2186
|
+
* @param height - Item height.
|
|
2187
|
+
*/
|
|
793
2188
|
public SetItemHeight(height: f32): void;
|
|
794
2189
|
|
|
2190
|
+
/**
|
|
2191
|
+
* Get item index.
|
|
2192
|
+
*
|
|
2193
|
+
* @param item - List item.
|
|
2194
|
+
* @returns Item index.
|
|
2195
|
+
*/
|
|
795
2196
|
public GetItemPos(item: CUIListItem): i32;
|
|
796
2197
|
|
|
2198
|
+
/**
|
|
2199
|
+
* @returns Whether the list is active.
|
|
2200
|
+
*/
|
|
797
2201
|
public IsListActive(): boolean;
|
|
798
2202
|
|
|
2203
|
+
/**
|
|
2204
|
+
* @returns Focused item index.
|
|
2205
|
+
*/
|
|
799
2206
|
public GetFocusedItem(): i32;
|
|
800
2207
|
|
|
2208
|
+
/**
|
|
2209
|
+
* Release focus capture.
|
|
2210
|
+
*/
|
|
801
2211
|
public ResetFocusCapture(): void;
|
|
802
2212
|
}
|
|
803
2213
|
|
|
804
2214
|
/**
|
|
2215
|
+
* UI binding for `CUIListItem`.
|
|
2216
|
+
*
|
|
805
2217
|
* @source C++ class CUIListItem : CUIButton
|
|
806
2218
|
* @customConstructor CUIListItem
|
|
807
2219
|
* @group xr_ui_interface
|
|
@@ -809,88 +2221,222 @@ declare module "xray16" {
|
|
|
809
2221
|
export class CUIListItem extends CUIButton {}
|
|
810
2222
|
|
|
811
2223
|
/**
|
|
2224
|
+
* UI binding for `CUIListItemEx`.
|
|
2225
|
+
*
|
|
812
2226
|
* @source C++ class CUIListItemEx : CUIListItem
|
|
813
2227
|
* @customConstructor CUIListItemEx
|
|
814
2228
|
* @group xr_ui_interface
|
|
815
2229
|
*/
|
|
816
2230
|
export class CUIListItemEx extends CUIListItem {
|
|
2231
|
+
/**
|
|
2232
|
+
* Set selection highlight color.
|
|
2233
|
+
*
|
|
2234
|
+
* @param color - ARGB color.
|
|
2235
|
+
*/
|
|
817
2236
|
public SetSelectionColor(color: u32): void;
|
|
818
2237
|
}
|
|
819
2238
|
|
|
820
2239
|
/**
|
|
2240
|
+
* UI binding for `UIHint`.
|
|
2241
|
+
*
|
|
821
2242
|
* @source C++ class UIHint : CUIWindow
|
|
822
2243
|
* @customConstructor UIHint
|
|
823
2244
|
* @group xr_ui_interface
|
|
824
2245
|
*/
|
|
825
2246
|
export class UIHint extends CUIWindow {
|
|
2247
|
+
/**
|
|
2248
|
+
* Create a hint window.
|
|
2249
|
+
*/
|
|
826
2250
|
public constructor();
|
|
827
2251
|
|
|
2252
|
+
/**
|
|
2253
|
+
* @returns Hint text.
|
|
2254
|
+
*/
|
|
828
2255
|
public GetHintText(): string;
|
|
829
2256
|
|
|
2257
|
+
/**
|
|
2258
|
+
* Set hint text.
|
|
2259
|
+
*
|
|
2260
|
+
* @param hint - Hint text.
|
|
2261
|
+
*/
|
|
830
2262
|
public SetHintText(hint: string): void;
|
|
831
2263
|
}
|
|
832
2264
|
|
|
833
2265
|
/**
|
|
2266
|
+
* UI binding for `CUIPdaWnd`.
|
|
2267
|
+
*
|
|
834
2268
|
* @source C++ class CUIPdaWnd : CUIDialogWnd
|
|
835
2269
|
* @customConstructor CUIPdaWnd
|
|
836
2270
|
* @group xr_ui_interface
|
|
2271
|
+
*
|
|
2272
|
+
* @remarks
|
|
2273
|
+
* The global PDA menu is owned by the current game UI. Use it only while a level HUD exists.
|
|
837
2274
|
*/
|
|
838
2275
|
export class CUIPdaWnd extends CUIDialogWnd {
|
|
2276
|
+
/**
|
|
2277
|
+
* Create a PDA dialog window.
|
|
2278
|
+
*/
|
|
839
2279
|
public constructor();
|
|
840
2280
|
|
|
2281
|
+
/**
|
|
2282
|
+
* Activate a PDA subdialog by section.
|
|
2283
|
+
*
|
|
2284
|
+
* @param section - Subdialog section.
|
|
2285
|
+
*/
|
|
841
2286
|
public SetActiveSubdialog(section: string): void;
|
|
842
2287
|
|
|
2288
|
+
/**
|
|
2289
|
+
* @returns Active PDA section.
|
|
2290
|
+
*/
|
|
843
2291
|
public GetActiveSection(): string;
|
|
844
2292
|
|
|
2293
|
+
/**
|
|
2294
|
+
* @returns PDA tab control.
|
|
2295
|
+
*/
|
|
845
2296
|
public GetTabControl(): CUITabControl;
|
|
846
2297
|
|
|
2298
|
+
/**
|
|
2299
|
+
* Set active PDA dialog window.
|
|
2300
|
+
*
|
|
2301
|
+
* @param dialog - Dialog window, or `null` to clear.
|
|
2302
|
+
*/
|
|
847
2303
|
public SetActiveDialog(dialog: CUIWindow | null): void;
|
|
848
2304
|
|
|
2305
|
+
/**
|
|
2306
|
+
* @returns Active PDA dialog window, or `null`.
|
|
2307
|
+
*/
|
|
849
2308
|
public GetActiveDialog(): CUIWindow | null;
|
|
850
2309
|
}
|
|
851
2310
|
|
|
852
2311
|
/**
|
|
2312
|
+
* UI binding for `CUIActorMenu`.
|
|
2313
|
+
*
|
|
853
2314
|
* @source C++ class CUIActorMenu : CUIDialogWnd
|
|
854
2315
|
* @customConstructor CUIActorMenu
|
|
855
2316
|
* @group xr_ui_interface
|
|
2317
|
+
*
|
|
2318
|
+
* @remarks
|
|
2319
|
+
* The global actor menu is owned by the current game UI. Inventory moves require an active actor inventory context.
|
|
856
2320
|
*/
|
|
857
2321
|
export class CUIActorMenu extends CUIDialogWnd {
|
|
2322
|
+
/**
|
|
2323
|
+
* Create an actor menu dialog.
|
|
2324
|
+
*/
|
|
858
2325
|
public constructor();
|
|
859
2326
|
|
|
2327
|
+
/**
|
|
2328
|
+
* @returns Item currently being dragged, or `null`.
|
|
2329
|
+
*/
|
|
860
2330
|
public get_drag_item(): game_object | null;
|
|
861
2331
|
|
|
2332
|
+
/**
|
|
2333
|
+
* Highlight inventory cells containing a section in a slot list.
|
|
2334
|
+
*
|
|
2335
|
+
* @param section - Item section name.
|
|
2336
|
+
* @param type - Drag-drop list type.
|
|
2337
|
+
* @param slot_id - Slot id.
|
|
2338
|
+
*/
|
|
862
2339
|
public highlight_section_in_slot(section: string, type: TXR_EDDListType, slot_id: u16): void;
|
|
863
2340
|
|
|
2341
|
+
/**
|
|
2342
|
+
* Highlight inventory cells that match a predicate in a slot list.
|
|
2343
|
+
*
|
|
2344
|
+
* @param functor - Predicate called for each item.
|
|
2345
|
+
* @param type - Drag-drop list type.
|
|
2346
|
+
* @param slot_id - Slot id.
|
|
2347
|
+
*/
|
|
864
2348
|
public highlight_for_each_in_slot(
|
|
865
2349
|
functor: (object: game_object) => boolean,
|
|
866
2350
|
type: TXR_EDDListType,
|
|
867
2351
|
slot_id: u16
|
|
868
2352
|
): void;
|
|
869
2353
|
|
|
2354
|
+
/**
|
|
2355
|
+
* Refresh the currently focused inventory cell.
|
|
2356
|
+
*/
|
|
870
2357
|
public refresh_current_cell_item(): void;
|
|
871
2358
|
|
|
2359
|
+
/**
|
|
2360
|
+
* Move an object to an actor slot.
|
|
2361
|
+
*
|
|
2362
|
+
* @remarks
|
|
2363
|
+
* `object` must be an inventory item that belongs to the actor menu context.
|
|
2364
|
+
*
|
|
2365
|
+
* @param object - Item object.
|
|
2366
|
+
* @param force_place - Whether to force placement.
|
|
2367
|
+
* @param slot_id - Slot id.
|
|
2368
|
+
* @returns Whether the move succeeded.
|
|
2369
|
+
*/
|
|
872
2370
|
public ToSlot(object: game_object, force_place: boolean, slot_id: u16): boolean;
|
|
873
2371
|
|
|
2372
|
+
/**
|
|
2373
|
+
* Move an object to the actor belt.
|
|
2374
|
+
*
|
|
2375
|
+
* @remarks
|
|
2376
|
+
* `object` must be an inventory item that belongs to the actor menu context.
|
|
2377
|
+
*
|
|
2378
|
+
* @param object - Item object.
|
|
2379
|
+
* @param use_cursor_position - Whether to use the cursor position.
|
|
2380
|
+
* @returns Whether the move succeeded.
|
|
2381
|
+
*/
|
|
874
2382
|
public ToBelt(object: game_object, use_cursor_position: boolean): boolean;
|
|
875
2383
|
}
|
|
876
2384
|
|
|
877
2385
|
/**
|
|
2386
|
+
* Actor menu drag-and-drop list type constants.
|
|
2387
|
+
*
|
|
878
2388
|
* @source C++ enum EDDListType
|
|
879
2389
|
* @customConstructor EDDListType
|
|
880
2390
|
* @group xr_ui_interface
|
|
2391
|
+
*
|
|
2392
|
+
* @remarks
|
|
2393
|
+
* These constants identify actor-menu drag-drop lists, not generic UI lists.
|
|
881
2394
|
*/
|
|
882
2395
|
export class EDDListType {
|
|
2396
|
+
/**
|
|
2397
|
+
* Engine enum value for `EDDListType.iActorBag`.
|
|
2398
|
+
*/
|
|
883
2399
|
public static readonly iActorBag: 2;
|
|
2400
|
+
/**
|
|
2401
|
+
* Engine enum value for `EDDListType.iActorBelt`.
|
|
2402
|
+
*/
|
|
884
2403
|
public static readonly iActorBelt: 3;
|
|
2404
|
+
/**
|
|
2405
|
+
* Engine enum value for `EDDListType.iActorSlot`.
|
|
2406
|
+
*/
|
|
885
2407
|
public static readonly iActorSlot: 1;
|
|
2408
|
+
/**
|
|
2409
|
+
* Engine enum value for `EDDListType.iActorTrade`.
|
|
2410
|
+
*/
|
|
886
2411
|
public static readonly iActorTrade: 4;
|
|
2412
|
+
/**
|
|
2413
|
+
* Engine enum value for `EDDListType.iDeadBodyBag`.
|
|
2414
|
+
*/
|
|
887
2415
|
public static readonly iDeadBodyBag: 7;
|
|
2416
|
+
/**
|
|
2417
|
+
* Engine enum value for `EDDListType.iInvalid`.
|
|
2418
|
+
*/
|
|
888
2419
|
public static readonly iInvalid: 0;
|
|
2420
|
+
/**
|
|
2421
|
+
* Engine enum value for `EDDListType.iPartnerTrade`.
|
|
2422
|
+
*/
|
|
889
2423
|
public static readonly iPartnerTrade: 6;
|
|
2424
|
+
/**
|
|
2425
|
+
* Engine enum value for `EDDListType.iPartnerTradeBag`.
|
|
2426
|
+
*/
|
|
890
2427
|
public static readonly iPartnerTradeBag: 5;
|
|
2428
|
+
/**
|
|
2429
|
+
* Engine enum value for `EDDListType.iQuickSlot`.
|
|
2430
|
+
*/
|
|
891
2431
|
public static readonly iQuickSlot: 8;
|
|
2432
|
+
/**
|
|
2433
|
+
* Engine enum value for `EDDListType.iTrashSlot`.
|
|
2434
|
+
*/
|
|
892
2435
|
public static readonly iTrashSlot: 9;
|
|
893
2436
|
|
|
2437
|
+
/**
|
|
2438
|
+
* Engine-owned drag-drop list constants.
|
|
2439
|
+
*/
|
|
894
2440
|
private constructor();
|
|
895
2441
|
}
|
|
896
2442
|
|