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.
Files changed (49) hide show
  1. package/package.json +1 -1
  2. package/types/xr_ai/xr_action.d.ts +1321 -29
  3. package/types/xr_ai/xr_alife.d.ts +1336 -32
  4. package/types/xr_ai/xr_enemy_evaluation.d.ts +112 -19
  5. package/types/xr_ai/xr_goap.d.ts +450 -3
  6. package/types/xr_ai/xr_graph.d.ts +94 -6
  7. package/types/xr_ai/xr_memory.d.ts +240 -6
  8. package/types/xr_lib/xr_animation.d.ts +185 -14
  9. package/types/xr_lib/xr_bitwise.d.ts +20 -8
  10. package/types/xr_lib/xr_color.d.ts +103 -6
  11. package/types/xr_lib/xr_debug.d.ts +110 -12
  12. package/types/xr_lib/xr_dialog.d.ts +99 -7
  13. package/types/xr_lib/xr_flags.d.ts +78 -15
  14. package/types/xr_lib/xr_fs.d.ts +395 -5
  15. package/types/xr_lib/xr_game.d.ts +101 -0
  16. package/types/xr_lib/xr_hit.d.ts +84 -0
  17. package/types/xr_lib/xr_ini.d.ts +60 -2
  18. package/types/xr_lib/xr_level.d.ts +182 -39
  19. package/types/xr_lib/xr_luabind.d.ts +37 -11
  20. package/types/xr_lib/xr_map.d.ts +137 -6
  21. package/types/xr_lib/xr_math.d.ts +56 -0
  22. package/types/xr_lib/xr_multiplayer.d.ts +729 -1
  23. package/types/xr_lib/xr_profile.d.ts +80 -0
  24. package/types/xr_lib/xr_properties.d.ts +159 -4
  25. package/types/xr_lib/xr_relation.d.ts +147 -0
  26. package/types/xr_lib/xr_render.d.ts +99 -3
  27. package/types/xr_lib/xr_save.d.ts +110 -4
  28. package/types/xr_lib/xr_sound.d.ts +373 -9
  29. package/types/xr_lib/xr_stats.ts +33 -4
  30. package/types/xr_lib/xr_task.d.ts +277 -0
  31. package/types/xr_lib/xr_time.d.ts +11 -0
  32. package/types/xr_object/client/xr_anomaly.d.ts +20 -0
  33. package/types/xr_object/client/xr_artefact.d.ts +57 -2
  34. package/types/xr_object/client/xr_client_object.d.ts +131 -0
  35. package/types/xr_object/client/xr_creature.d.ts +79 -0
  36. package/types/xr_object/client/xr_item.d.ts +108 -2
  37. package/types/xr_object/client/xr_level.d.ts +482 -14
  38. package/types/xr_object/client/xr_physic.d.ts +459 -29
  39. package/types/xr_object/client/xr_zone.d.ts +38 -0
  40. package/types/xr_object/script/xr_script_interface.d.ts +236 -1
  41. package/types/xr_object/script/xr_script_object.d.ts +3402 -82
  42. package/types/xr_object/script/xr_script_trade.d.ts +25 -15
  43. package/types/xr_object/server/xr_server_object.d.ts +707 -15
  44. package/types/xr_ui/xr_ui_asset.d.ts +241 -6
  45. package/types/xr_ui/xr_ui_core.d.ts +327 -9
  46. package/types/xr_ui/xr_ui_event.d.ts +1067 -1
  47. package/types/xr_ui/xr_ui_interface.d.ts +1563 -17
  48. package/types/xr_ui/xr_ui_menu.d.ts +259 -16
  49. package/types/xrf_plugin.d.ts +44 -14
@@ -1,106 +1,424 @@
1
1
  declare module "xray16" {
2
2
  /**
3
+ * XML UI initialization helper.
4
+ *
3
5
  * @source C++ class CScriptXmlInit
4
6
  * @customConstructor CScriptXmlInit
5
7
  * @group xr_ui_core
8
+ *
9
+ * @remarks
10
+ * Call `ParseFile()` before `Init*` helpers. Created controls are attached to `parent` when it is provided; scroll
11
+ * views receive them through `AddWindow()`, other windows through `AttachChild()`. Controls created without a parent
12
+ * are not attached by this helper.
6
13
  */
7
14
  export class CScriptXmlInit {
15
+ /**
16
+ * Create an XML initializer.
17
+ */
8
18
  public constructor();
9
19
 
20
+ /**
21
+ * Load a UI XML file from the configured UI paths.
22
+ *
23
+ * @remarks
24
+ * Paths are resolved through the engine config/UI path stack, including the active and default UI paths.
25
+ *
26
+ * @param path - XML file path.
27
+ */
10
28
  public ParseFile(path: string): void;
11
29
 
30
+ /**
31
+ * Load shared texture metadata from an XML file.
32
+ *
33
+ * @remarks
34
+ * Missing files are ignored by the native loader. Duplicate texture ids from this file replace existing entries.
35
+ *
36
+ * @param path - XML file path.
37
+ */
12
38
  public ParseShTexInfo(path: string): void;
13
39
 
40
+ /**
41
+ * Create and initialize a button from XML.
42
+ *
43
+ * @remarks
44
+ * The created button is marked for auto-delete by the native binding.
45
+ *
46
+ * @param selector - XML node path.
47
+ * @param parent - Optional parent window.
48
+ * @returns Created button.
49
+ */
50
+ public InitButton(selector: string, parent: CUIWindow | null): CUIButton;
51
+
52
+ /**
53
+ * Create and initialize a three-state button from XML.
54
+ *
55
+ * @remarks
56
+ * When `parent` is provided, the created control is marked for parent-owned deletion.
57
+ *
58
+ * @param selector - XML node path.
59
+ * @param parent - Optional parent window.
60
+ * @returns Created button.
61
+ */
14
62
  public Init3tButton(selector: string, parent: CUIWindow | null): CUI3tButton;
15
63
 
64
+ /**
65
+ * Create and initialize an animated static from XML.
66
+ *
67
+ * @remarks
68
+ * When `parent` is provided, the created control is marked for parent-owned deletion.
69
+ *
70
+ * @param selector - XML node path.
71
+ * @param parent - Optional parent window.
72
+ * @returns Created static control.
73
+ */
16
74
  public InitAnimStatic(selector: string, parent: CUIWindow | null): CUIStatic;
17
75
 
76
+ /**
77
+ * Create and initialize a CD key edit box from XML.
78
+ *
79
+ * @remarks
80
+ * Assigns CD-key callbacks and applies the current option value after initialization.
81
+ *
82
+ * @param selector - XML node path.
83
+ * @param parent - Optional parent window.
84
+ * @returns Created edit box.
85
+ */
18
86
  public InitCDkey(selector: string, parent: CUIWindow | null): CUIEditBox;
19
87
 
88
+ /**
89
+ * Create and initialize a check button from XML.
90
+ *
91
+ * @param selector - XML node path.
92
+ * @param parent - Optional parent window.
93
+ * @returns Created check button.
94
+ */
20
95
  public InitCheck(selector: string, parent: CUIWindow | null): CUICheckButton;
21
96
 
97
+ /**
98
+ * Create and initialize a combo box from XML.
99
+ *
100
+ * @param selector - XML node path.
101
+ * @param parent - Optional parent window.
102
+ * @returns Created combo box.
103
+ */
22
104
  public InitComboBox(selector: string, parent: CUIWindow | null): CUIComboBox;
23
105
 
106
+ /**
107
+ * Create and initialize an edit box from XML.
108
+ *
109
+ * @param selector - XML node path.
110
+ * @param parent - Optional parent window.
111
+ * @returns Created edit box.
112
+ */
24
113
  public InitEditBox(selector: string, parent: CUIWindow | null): CUIEditBox;
25
114
 
115
+ /**
116
+ * Create and initialize a frame window from XML.
117
+ *
118
+ * @param selector - XML node path.
119
+ * @param parent - Optional parent window.
120
+ * @returns Created frame window.
121
+ */
26
122
  public InitFrame(selector: string, parent: CUIWindow | null): CUIFrameWindow;
27
123
 
124
+ /**
125
+ * Create and initialize a frame line from XML.
126
+ *
127
+ * @param selector - XML node path.
128
+ * @param parent - Optional parent window.
129
+ * @returns Created frame line.
130
+ */
28
131
  public InitFrameLine(selector: string, parent: CUIWindow | null): CUIFrameLineWnd;
29
132
 
133
+ /**
134
+ * Create and initialize a key binding control from XML.
135
+ *
136
+ * @param selector - XML node path.
137
+ * @param parent - Optional parent window.
138
+ * @returns Created key binding window.
139
+ */
30
140
  public InitKeyBinding(selector: string, parent: CUIWindow | null): CUIWindow;
31
141
 
142
+ /**
143
+ * Create and initialize a label from XML.
144
+ *
145
+ * @param selector - XML node path.
146
+ * @param parent - Optional parent window.
147
+ * @returns Created label static.
148
+ */
32
149
  public InitLabel(selector: string, parent: CUIWindow | null): CUIStatic;
33
150
 
151
+ /**
152
+ * Create and initialize a list window from XML.
153
+ *
154
+ * @remarks
155
+ * When `parent` is provided, the created control is marked for parent-owned deletion.
156
+ *
157
+ * @param selector - XML node path.
158
+ * @param parent - Optional parent window.
159
+ * @returns Created list window.
160
+ */
34
161
  public InitList(selector: string, parent: CUIWindow | null): CUIListWnd;
35
162
 
163
+ /**
164
+ * Create and initialize a list box from XML.
165
+ *
166
+ * @remarks
167
+ * When `parent` is provided, the created control is marked for parent-owned deletion.
168
+ *
169
+ * @param selector - XML node path.
170
+ * @param parent - Optional parent window.
171
+ * @returns Created list box.
172
+ */
36
173
  public InitListBox<T extends CUIListBoxItem = CUIListBoxItem>(
37
174
  selector: string,
38
175
  parent: CUIWindow | null
39
176
  ): CUIListBox<T>;
40
177
 
178
+ /**
179
+ * Create and initialize a main-menu shniaga control from XML.
180
+ *
181
+ * @param selector - XML node path.
182
+ * @param parent - Optional parent window.
183
+ * @returns Created main-menu shniaga control.
184
+ */
41
185
  public InitMMShniaga(selector: string, parent: CUIWindow | null): CUIMMShniaga;
42
186
 
187
+ /**
188
+ * Create and initialize a multiplayer player-name edit box from XML.
189
+ *
190
+ * @param selector - XML node path.
191
+ * @param parent - Optional parent window.
192
+ * @returns Created edit box.
193
+ */
43
194
  public InitMPPlayerName(selector: string, parent: CUIWindow | null): CUIEditBox;
44
195
 
196
+ /**
197
+ * Create and initialize a map info control from XML.
198
+ *
199
+ * @remarks
200
+ * Initializes both the base window rect and the map-info content area from the XML node.
201
+ *
202
+ * @param selector - XML node path.
203
+ * @param parent - Optional parent window.
204
+ * @returns Created map info control.
205
+ */
45
206
  public InitMapInfo(selector: string, parent: CUIWindow | null): CUIMapInfo;
46
207
 
208
+ /**
209
+ * Create and initialize a map list control from XML.
210
+ *
211
+ * @param selector - XML node path.
212
+ * @param parent - Optional parent window.
213
+ * @returns Created map list control.
214
+ */
47
215
  public InitMapList(selector: string, parent: CUIWindow | null): CUIMapList;
48
216
 
217
+ /**
218
+ * Create and initialize a progress bar from XML.
219
+ *
220
+ * @param selector - XML node path.
221
+ * @param parent - Optional parent window.
222
+ * @returns Created progress bar.
223
+ */
49
224
  public InitProgressBar(selector: string, parent: CUIWindow | null): CUIProgressBar;
50
225
 
226
+ /**
227
+ * Create and initialize a scroll view from XML.
228
+ *
229
+ * @remarks
230
+ * Child controls created under this parent are added through `AddWindow()`.
231
+ *
232
+ * @param selector - XML node path.
233
+ * @param parent - Optional parent window.
234
+ * @returns Created scroll view.
235
+ */
51
236
  public InitScrollView(selector: string, parent: CUIWindow | null): CUIScrollView;
52
237
 
238
+ /**
239
+ * Create and initialize a server list from XML.
240
+ *
241
+ * @param selector - XML node path.
242
+ * @param parent - Optional parent window.
243
+ * @returns Created server list.
244
+ */
53
245
  public InitServerList(selector: string, parent: CUIWindow | null): CServerList;
54
246
 
247
+ /**
248
+ * Create and initialize a sleep static from XML.
249
+ *
250
+ * @param selector - XML node path.
251
+ * @param parent - Optional parent window.
252
+ * @returns Created sleep static.
253
+ */
55
254
  public InitSleepStatic(selector: string, parent: CUIWindow | null): CUISleepStatic;
56
255
 
256
+ /**
257
+ * Create and initialize a float spin control from XML.
258
+ *
259
+ * @param selector - XML node path.
260
+ * @param parent - Optional parent window.
261
+ * @returns Created spin control.
262
+ */
57
263
  public InitSpinFlt(selector: string, parent: CUIWindow | null): CUISpinFlt;
58
264
 
265
+ /**
266
+ * Create and initialize an integer spin control from XML.
267
+ *
268
+ * @param selector - XML node path.
269
+ * @param parent - Optional parent window.
270
+ * @returns Created spin control.
271
+ */
59
272
  public InitSpinNum(selector: string, parent: CUIWindow | null): CUISpinNum;
60
273
 
274
+ /**
275
+ * Create and initialize a text spin control from XML.
276
+ *
277
+ * @param selector - XML node path.
278
+ * @param parent - Optional parent window.
279
+ * @returns Created spin control.
280
+ */
61
281
  public InitSpinText(selector: string, parent: CUIWindow | null): CUISpinText;
62
282
 
283
+ /**
284
+ * Create and initialize a static control from XML.
285
+ *
286
+ * @remarks
287
+ * `InitLabel()` is bound to the same native initializer as this method.
288
+ *
289
+ * @param selector - XML node path.
290
+ * @param parent - Optional parent window.
291
+ * @returns Created static control.
292
+ */
63
293
  public InitStatic(selector: string, parent: CUIWindow | null): CUIStatic;
64
294
 
295
+ /**
296
+ * Create and initialize a tab control from XML.
297
+ *
298
+ * @param selector - XML node path.
299
+ * @param parent - Optional parent window.
300
+ * @returns Created tab control.
301
+ */
65
302
  public InitTab(selector: string, parent: CUIWindow | null): CUITabControl;
66
303
 
304
+ /**
305
+ * Create and initialize a text window from XML.
306
+ *
307
+ * @param selector - XML node path.
308
+ * @param parent - Optional parent window.
309
+ * @returns Created text window.
310
+ */
67
311
  public InitTextWnd(selector: string, parent: CUIWindow | null): CUITextWnd;
68
312
 
313
+ /**
314
+ * Create and initialize a track bar from XML.
315
+ *
316
+ * @param selector - XML node path.
317
+ * @param parent - Optional parent window.
318
+ * @returns Created track bar.
319
+ */
69
320
  public InitTrackBar(selector: string, parent: CUIWindow | null): CUITrackBar;
70
321
 
322
+ /**
323
+ * Create and initialize a version list from XML.
324
+ *
325
+ * @param selector - XML node path.
326
+ * @param parent - Optional parent window.
327
+ * @returns Created version list.
328
+ */
71
329
  public InitVerList(selector: string, parent: CUIWindow | null): CUIVersionList;
72
330
 
331
+ /**
332
+ * Create and initialize a hint window from XML.
333
+ *
334
+ * @param selector - XML node path.
335
+ * @param parent - Optional parent window.
336
+ * @returns Created hint window.
337
+ */
73
338
  public InitHint(selector: string, parent: CUIWindow | null): UIHint;
74
339
 
340
+ /**
341
+ * Initialize a window already created by script.
342
+ *
343
+ * @remarks
344
+ * This does not create a child window. It applies XML properties to the passed window and does not attach it to a
345
+ * parent.
346
+ *
347
+ * @param selector - XML node path.
348
+ * @param index - XML node index.
349
+ * @param parent - Window to initialize.
350
+ */
75
351
  public InitWindow(selector: string, index: i32, parent: CUIWindow | null): void;
352
+
353
+ /**
354
+ * Initialize a group of auto-created static controls under an existing window.
355
+ *
356
+ * @remarks
357
+ * Reads static child definitions from the selected XML node and attaches them to `parent`. Requires a non-null
358
+ * parent window.
359
+ *
360
+ * @param selector - XML node path.
361
+ * @param parent - Parent window.
362
+ */
363
+ public InitAutoStaticGroup(selector: string, parent: CUIWindow): void;
76
364
  }
77
365
 
78
366
  /**
367
+ * Move a window so it fits inside a rectangle.
368
+ *
79
369
  * @group xr_ui_core
80
370
  *
81
- * @param window
82
- * @param rect
83
- * @param a
84
- * @param b
371
+ * @remarks
372
+ * The window may be moved; its size is not changed.
373
+ *
374
+ * @param window - Window to fit.
375
+ * @param rect - Bounding rectangle.
376
+ * @param horizontal_align - Horizontal alignment hint.
377
+ * @param vertical_align - Vertical alignment hint.
378
+ * @returns Whether the window was adjusted.
85
379
  */
86
- export function FitInRect(this: void, window: CUIWindow, rect: Frect, a: number, b: number): boolean;
380
+ export function FitInRect(
381
+ this: void,
382
+ window: CUIWindow,
383
+ rect: Frect,
384
+ horizontal_align: number,
385
+ vertical_align: number
386
+ ): boolean;
87
387
 
88
388
  /**
389
+ * Get the texture rectangle for a UI atlas entry.
390
+ *
89
391
  * @group xr_ui_core
90
392
  *
91
- * @param str
393
+ * @remarks
394
+ * Uses the engine's fatal texture lookup path when the atlas entry is missing.
395
+ *
396
+ * @param name - Texture atlas entry name.
397
+ * @returns Texture rectangle.
92
398
  */
93
- export function GetTextureRect(this: void, str: string): Frect;
399
+ export function GetTextureRect(this: void, name: string): Frect;
94
400
 
95
401
  /**
402
+ * Get current UI cursor position.
403
+ *
96
404
  * @group xr_ui_core
405
+ *
406
+ * @remarks
407
+ * Coordinates are in the engine UI coordinate space, not raw window pixels.
408
+ *
409
+ * @returns Cursor position.
97
410
  */
98
411
  export function GetCursorPosition(this: void): vector2;
99
412
 
100
413
  /**
414
+ * Set current UI cursor position.
415
+ *
101
416
  * @group xr_ui_core
102
417
  *
103
- * @param vector
418
+ * @remarks
419
+ * The engine also moves the system cursor when the UI cursor is bound to it.
420
+ *
421
+ * @param position - Cursor position.
104
422
  */
105
- export function SetCursorPosition(this: void, vector: vector2): void;
423
+ export function SetCursorPosition(this: void, position: vector2): void;
106
424
  }