xray16 1.5.4 → 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.
Files changed (55) hide show
  1. package/README.md +6 -0
  2. package/package.json +12 -6
  3. package/plugins/optimize_return_ternary.d.ts +6 -0
  4. package/plugins/optimize_return_ternary.js +65 -0
  5. package/xray16.d.ts +30847 -0
  6. package/types/index.d.ts +0 -55
  7. package/types/xr_ai/xr_action.d.ts +0 -1802
  8. package/types/xr_ai/xr_alife.d.ts +0 -1870
  9. package/types/xr_ai/xr_enemy_evaluation.d.ts +0 -134
  10. package/types/xr_ai/xr_goap.d.ts +0 -1116
  11. package/types/xr_ai/xr_graph.d.ts +0 -135
  12. package/types/xr_ai/xr_memory.d.ts +0 -382
  13. package/types/xr_lib/xr_animation.d.ts +0 -252
  14. package/types/xr_lib/xr_bitwise.d.ts +0 -44
  15. package/types/xr_lib/xr_color.d.ts +0 -142
  16. package/types/xr_lib/xr_debug.d.ts +0 -181
  17. package/types/xr_lib/xr_dialog.d.ts +0 -132
  18. package/types/xr_lib/xr_flags.d.ts +0 -592
  19. package/types/xr_lib/xr_fs.d.ts +0 -615
  20. package/types/xr_lib/xr_game.d.ts +0 -362
  21. package/types/xr_lib/xr_hit.d.ts +0 -125
  22. package/types/xr_lib/xr_ini.d.ts +0 -473
  23. package/types/xr_lib/xr_level.d.ts +0 -795
  24. package/types/xr_lib/xr_luabind.d.ts +0 -90
  25. package/types/xr_lib/xr_map.d.ts +0 -192
  26. package/types/xr_lib/xr_math.d.ts +0 -871
  27. package/types/xr_lib/xr_multiplayer.d.ts +0 -1079
  28. package/types/xr_lib/xr_profile.d.ts +0 -272
  29. package/types/xr_lib/xr_properties.d.ts +0 -610
  30. package/types/xr_lib/xr_relation.d.ts +0 -231
  31. package/types/xr_lib/xr_render.d.ts +0 -167
  32. package/types/xr_lib/xr_save.d.ts +0 -833
  33. package/types/xr_lib/xr_sound.d.ts +0 -515
  34. package/types/xr_lib/xr_stats.ts +0 -49
  35. package/types/xr_lib/xr_task.d.ts +0 -388
  36. package/types/xr_lib/xr_time.d.ts +0 -177
  37. package/types/xr_lib/xr_type.d.ts +0 -75
  38. package/types/xr_object/client/xr_anomaly.d.ts +0 -70
  39. package/types/xr_object/client/xr_artefact.d.ts +0 -153
  40. package/types/xr_object/client/xr_client_object.d.ts +0 -207
  41. package/types/xr_object/client/xr_creature.d.ts +0 -243
  42. package/types/xr_object/client/xr_item.d.ts +0 -370
  43. package/types/xr_object/client/xr_level.d.ts +0 -753
  44. package/types/xr_object/client/xr_physic.d.ts +0 -644
  45. package/types/xr_object/client/xr_zone.d.ts +0 -85
  46. package/types/xr_object/script/xr_script_interface.d.ts +0 -819
  47. package/types/xr_object/script/xr_script_object.d.ts +0 -5719
  48. package/types/xr_object/script/xr_script_trade.d.ts +0 -51
  49. package/types/xr_object/server/xr_server_object.d.ts +0 -1486
  50. package/types/xr_ui/xr_ui_asset.d.ts +0 -364
  51. package/types/xr_ui/xr_ui_core.d.ts +0 -424
  52. package/types/xr_ui/xr_ui_event.d.ts +0 -1449
  53. package/types/xr_ui/xr_ui_interface.d.ts +0 -2447
  54. package/types/xr_ui/xr_ui_menu.d.ts +0 -385
  55. package/types/xrf_plugin.d.ts +0 -109
@@ -1,424 +0,0 @@
1
- declare module "xray16" {
2
- /**
3
- * XML UI initialization helper.
4
- *
5
- * @source C++ class CScriptXmlInit
6
- * @customConstructor CScriptXmlInit
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.
13
- */
14
- export class CScriptXmlInit {
15
- /**
16
- * Create an XML initializer.
17
- */
18
- public constructor();
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
- */
28
- public ParseFile(path: string): void;
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
- */
38
- public ParseShTexInfo(path: string): void;
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
- */
62
- public Init3tButton(selector: string, parent: CUIWindow | null): CUI3tButton;
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
- */
74
- public InitAnimStatic(selector: string, parent: CUIWindow | null): CUIStatic;
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
- */
86
- public InitCDkey(selector: string, parent: CUIWindow | null): CUIEditBox;
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
- */
95
- public InitCheck(selector: string, parent: CUIWindow | null): CUICheckButton;
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
- */
104
- public InitComboBox(selector: string, parent: CUIWindow | null): CUIComboBox;
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
- */
113
- public InitEditBox(selector: string, parent: CUIWindow | null): CUIEditBox;
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
- */
122
- public InitFrame(selector: string, parent: CUIWindow | null): CUIFrameWindow;
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
- */
131
- public InitFrameLine(selector: string, parent: CUIWindow | null): CUIFrameLineWnd;
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
- */
140
- public InitKeyBinding(selector: string, parent: CUIWindow | null): CUIWindow;
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
- */
149
- public InitLabel(selector: string, parent: CUIWindow | null): CUIStatic;
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
- */
161
- public InitList(selector: string, parent: CUIWindow | null): CUIListWnd;
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
- */
173
- public InitListBox<T extends CUIListBoxItem = CUIListBoxItem>(
174
- selector: string,
175
- parent: CUIWindow | null
176
- ): CUIListBox<T>;
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
- */
185
- public InitMMShniaga(selector: string, parent: CUIWindow | null): CUIMMShniaga;
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
- */
194
- public InitMPPlayerName(selector: string, parent: CUIWindow | null): CUIEditBox;
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
- */
206
- public InitMapInfo(selector: string, parent: CUIWindow | null): CUIMapInfo;
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
- */
215
- public InitMapList(selector: string, parent: CUIWindow | null): CUIMapList;
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
- */
224
- public InitProgressBar(selector: string, parent: CUIWindow | null): CUIProgressBar;
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
- */
236
- public InitScrollView(selector: string, parent: CUIWindow | null): CUIScrollView;
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
- */
245
- public InitServerList(selector: string, parent: CUIWindow | null): CServerList;
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
- */
254
- public InitSleepStatic(selector: string, parent: CUIWindow | null): CUISleepStatic;
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
- */
263
- public InitSpinFlt(selector: string, parent: CUIWindow | null): CUISpinFlt;
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
- */
272
- public InitSpinNum(selector: string, parent: CUIWindow | null): CUISpinNum;
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
- */
281
- public InitSpinText(selector: string, parent: CUIWindow | null): CUISpinText;
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
- */
293
- public InitStatic(selector: string, parent: CUIWindow | null): CUIStatic;
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
- */
302
- public InitTab(selector: string, parent: CUIWindow | null): CUITabControl;
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
- */
311
- public InitTextWnd(selector: string, parent: CUIWindow | null): CUITextWnd;
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
- */
320
- public InitTrackBar(selector: string, parent: CUIWindow | null): CUITrackBar;
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
- */
329
- public InitVerList(selector: string, parent: CUIWindow | null): CUIVersionList;
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
- */
338
- public InitHint(selector: string, parent: CUIWindow | null): UIHint;
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
- */
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;
364
- }
365
-
366
- /**
367
- * Move a window so it fits inside a rectangle.
368
- *
369
- * @group xr_ui_core
370
- *
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.
379
- */
380
- export function FitInRect(
381
- this: void,
382
- window: CUIWindow,
383
- rect: Frect,
384
- horizontal_align: number,
385
- vertical_align: number
386
- ): boolean;
387
-
388
- /**
389
- * Get the texture rectangle for a UI atlas entry.
390
- *
391
- * @group xr_ui_core
392
- *
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.
398
- */
399
- export function GetTextureRect(this: void, name: string): Frect;
400
-
401
- /**
402
- * Get current UI cursor position.
403
- *
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.
410
- */
411
- export function GetCursorPosition(this: void): vector2;
412
-
413
- /**
414
- * Set current UI cursor position.
415
- *
416
- * @group xr_ui_core
417
- *
418
- * @remarks
419
- * The engine also moves the system cursor when the UI cursor is bound to it.
420
- *
421
- * @param position - Cursor position.
422
- */
423
- export function SetCursorPosition(this: void, position: vector2): void;
424
- }