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