xray16 1.0.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 (58) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +57 -0
  3. package/package.json +38 -0
  4. package/plugins/built_at_info.ts +18 -0
  5. package/plugins/from_cast_utils.ts +34 -0
  6. package/plugins/global_declarations_transform.ts +24 -0
  7. package/plugins/inject_filename.ts +22 -0
  8. package/plugins/strip_lua_logger.ts +73 -0
  9. package/plugins/transform_luabind_class/plugin.ts +51 -0
  10. package/plugins/transform_luabind_class/transformation/class_declaration.ts +226 -0
  11. package/plugins/transform_luabind_class/transformation/constants.ts +4 -0
  12. package/plugins/transform_luabind_class/transformation/decorators.ts +16 -0
  13. package/plugins/transform_luabind_class/transformation/errors.ts +31 -0
  14. package/plugins/transform_luabind_class/transformation/index.ts +5 -0
  15. package/plugins/transform_luabind_class/transformation/members/accessors.ts +48 -0
  16. package/plugins/transform_luabind_class/transformation/members/constructor.ts +107 -0
  17. package/plugins/transform_luabind_class/transformation/members/fields.ts +53 -0
  18. package/plugins/transform_luabind_class/transformation/members/method.ts +70 -0
  19. package/plugins/transform_luabind_class/transformation/new.ts +14 -0
  20. package/plugins/transform_luabind_class/transformation/setup.ts +128 -0
  21. package/plugins/transform_luabind_class/transformation/super.ts +92 -0
  22. package/plugins/transform_luabind_class/transformation/utils.ts +90 -0
  23. package/plugins/utils/diagnostics.ts +24 -0
  24. package/src/index.d.ts +63 -0
  25. package/src/xr_constant.d.ts +976 -0
  26. package/src/xr_core.d.ts +347 -0
  27. package/src/xr_global.d.ts +613 -0
  28. package/src/xr_lib/xr_fs.d.ts +333 -0
  29. package/src/xr_lib/xr_math.d.ts +165 -0
  30. package/src/xr_lib/xr_utils.d.ts +407 -0
  31. package/src/xr_luabind.d.ts +34 -0
  32. package/src/xr_map/xr_map.d.ts +42 -0
  33. package/src/xr_object/xr_action.d.ts +482 -0
  34. package/src/xr_object/xr_alife.d.ts +206 -0
  35. package/src/xr_object/xr_anomaly.d.ts +50 -0
  36. package/src/xr_object/xr_artefact.d.ts +98 -0
  37. package/src/xr_object/xr_client_object.d.ts +1255 -0
  38. package/src/xr_object/xr_creature.d.ts +157 -0
  39. package/src/xr_object/xr_dialog.d.ts +34 -0
  40. package/src/xr_object/xr_item.d.ts +239 -0
  41. package/src/xr_object/xr_level.d.ts +166 -0
  42. package/src/xr_object/xr_physic.d.ts +119 -0
  43. package/src/xr_object/xr_quest.d.ts +47 -0
  44. package/src/xr_object/xr_server_object.d.ts +686 -0
  45. package/src/xr_online/xr_multiplayer.d.ts +299 -0
  46. package/src/xr_sound/xr_sound.d.ts +153 -0
  47. package/src/xr_type/xr_enums.d.ts +17 -0
  48. package/src/xr_type/xr_type.d.ts +70 -0
  49. package/src/xr_ui/README.md +277 -0
  50. package/src/xr_ui/demo/CServerList.png +0 -0
  51. package/src/xr_ui/demo/CUI3tButton.png +0 -0
  52. package/src/xr_ui/demo/CUICheckButton.png +0 -0
  53. package/src/xr_ui/demo/CUIComboBox.png +0 -0
  54. package/src/xr_ui/demo/CUICustomEdit.png +0 -0
  55. package/src/xr_ui/demo/CUIStatic.png +0 -0
  56. package/src/xr_ui/demo/CUITrackBar.png +0 -0
  57. package/src/xr_ui/xr_ui_core.d.ts +185 -0
  58. package/src/xr_ui/xr_ui_interface.d.ts +666 -0
@@ -0,0 +1,277 @@
1
+ # 🏀 C_UI
2
+
3
+ Base classes bindings to work with UI interface elements.
4
+
5
+ ## 🧩 C_UI_CORE
6
+
7
+ Core classes for work with UI elements.
8
+
9
+ ## 🧩 C_XML
10
+
11
+ Base classes for work with xml parsing.
12
+
13
+ ## 🧩 C_UI_INTERFACE
14
+
15
+ Base classes for creation of UI elements and windows.
16
+
17
+ ### 🧱 CUIWindow
18
+
19
+ <p>
20
+ Base element for representation of nested components. Basically grid.
21
+ </p>
22
+
23
+ ### 🧱 CUIStatic
24
+
25
+ <p>
26
+ Any static element in ui that represents simple label, animation or image.
27
+ Example: main menu background.
28
+ </p>
29
+
30
+ <img src="demo\CUIStatic.png" alt="screenshot" width="600"/>
31
+
32
+ ### 🧱 CUIButton
33
+
34
+ <p>
35
+ Base button core with logic, normally 'CUI3tButton' is preferred (?).
36
+ </p>
37
+
38
+ ### 🧱 CUI3tButton
39
+
40
+ <p>
41
+ Generic button element used everywhere, from settings to different modal windows.
42
+ Example: any action button.
43
+ </p>
44
+
45
+ <img src="demo\CUI3tButton.png" alt="screenshot" width="200"/>
46
+
47
+ ### 🧱 CUICheckButton
48
+
49
+ <p>
50
+ Generic checkbox button for settings true/false values.
51
+ Example: settings options.
52
+ </p>
53
+
54
+ ### 🧱 CUIComboBox
55
+
56
+ <p>
57
+ Generic combobox with list of items for selection.
58
+ Example: settings selection.
59
+ </p>
60
+
61
+ <img src="demo\CUIComboBox.png" alt="screenshot" width="400"/>
62
+
63
+ ### 🧱 CUICustomEdit
64
+
65
+ <p>
66
+ Generic component with text or number input.
67
+ Example: login inputs for multiplayer, cd key input.
68
+ </p>
69
+
70
+ <img src="demo\CUICustomEdit.png" alt="screenshot" width="600"/>
71
+
72
+ ### 🧱 CUICustomSpin
73
+
74
+ <p>
75
+ todo;
76
+ </p>
77
+
78
+ <img src="demo\CUICustomSpin.png" alt="screenshot" width="600"/>
79
+
80
+ ### 🧱 CUIDialogWnd
81
+
82
+ <p>
83
+ todo;
84
+ </p>
85
+
86
+ <img src="demo\CUIDialogWnd.png" alt="screenshot" width="600"/>
87
+
88
+ ### 🧱 CUIScriptWnd
89
+
90
+ <p>
91
+ todo;
92
+ </p>
93
+
94
+ <img src="demo\CUIScriptWnd.png" alt="screenshot" width="600"/>
95
+
96
+ ### 🧱 CUIEditBox
97
+
98
+ <p>
99
+ todo;
100
+ </p>
101
+
102
+ <img src="demo\CUIEditBox.png" alt="screenshot" width="600"/>
103
+
104
+ ### 🧱 CUIFrameLineWnd
105
+
106
+ <p>
107
+ todo;
108
+ </p>
109
+
110
+ <img src="demo\CUIFrameLineWnd.png" alt="screenshot" width="600"/>
111
+
112
+ ### 🧱 CUIFrameWindow
113
+
114
+ <p>
115
+ todo;
116
+ </p>
117
+
118
+ <img src="demo\CUIFrameWindow.png" alt="screenshot" width="600"/>
119
+
120
+ ### 🧱 CUILines
121
+
122
+ <p>
123
+ todo;
124
+ </p>
125
+
126
+ <img src="demo\CUILines.png" alt="screenshot" width="600"/>
127
+
128
+ ### 🧱 CUIListBox
129
+
130
+ <p>
131
+ todo;
132
+ </p>
133
+
134
+ <img src="demo\CUIListBox.png" alt="screenshot" width="600"/>
135
+
136
+ ### 🧱 CUIListBoxItem
137
+
138
+ <p>
139
+ todo;
140
+ </p>
141
+
142
+ <img src="demo\CUIListBoxItem.png" alt="screenshot" width="600"/>
143
+
144
+ ### 🧱 CUIListBoxItemMsgChain
145
+
146
+ <p>
147
+ todo;
148
+ </p>
149
+
150
+ <img src="demo\CUIListBoxItemMsgChain.png" alt="screenshot" width="600"/>
151
+
152
+ ### 🧱 CUIMMShniaga
153
+
154
+ <p>
155
+ todo;
156
+ </p>
157
+
158
+ <img src="demo\CUIMMShniaga.png" alt="screenshot" width="600"/>
159
+
160
+ ### 🧱 CUIMapInfo
161
+
162
+ <p>
163
+ todo;
164
+ </p>
165
+
166
+ <img src="demo\CUIMapInfo.png" alt="screenshot" width="600"/>
167
+
168
+ ### 🧱 CUIMapList
169
+
170
+ <p>
171
+ todo;
172
+ </p>
173
+
174
+ <img src="demo\CUIMapList.png" alt="screenshot" width="600"/>
175
+
176
+ ### 🧱 CUIMessageBox
177
+
178
+ <p>
179
+ todo;
180
+ </p>
181
+
182
+ <img src="demo\CUIMessageBox.png" alt="screenshot" width="600"/>
183
+
184
+ ### 🧱 CUIProgressBar
185
+
186
+ <p>
187
+ todo;
188
+ </p>
189
+
190
+ <img src="demo\CUIProgressBar.png" alt="screenshot" width="600"/>
191
+
192
+ ### 🧱 CUIPropertiesBox
193
+
194
+ <p>
195
+ todo;
196
+ </p>
197
+
198
+ <img src="demo\CUIPropertiesBox.png" alt="screenshot" width="600"/>
199
+
200
+ ### 🧱 CUIScrollView
201
+
202
+ <p>
203
+ todo;
204
+ </p>
205
+
206
+ <img src="demo\CUIScrollView.png" alt="screenshot" width="600"/>
207
+ 1
208
+ ### 🧱 CUISleepStatic
209
+ <p>
210
+ todo;
211
+ </p>
212
+
213
+ <img src="demo\CUISleepStatic.png" alt="screenshot" width="600"/>
214
+
215
+ ### 🧱 CUISpinFlt
216
+
217
+ <p>
218
+ todo;
219
+ </p>
220
+
221
+ <img src="demo\CUISpinFlt.png" alt="screenshot" width="600"/>
222
+
223
+ ### 🧱 CUISpinNum
224
+
225
+ <p>
226
+ todo;
227
+ </p>
228
+
229
+ <img src="demo\CUISpinNum.png" alt="screenshot" width="600"/>
230
+
231
+ ### 🧱 CUISpinText
232
+
233
+ <p>
234
+ todo;
235
+ </p>
236
+
237
+ <img src="demo\CUISpinText.png" alt="screenshot" width="600"/>
238
+
239
+ ### 🧱 CUITabButton
240
+
241
+ <p>
242
+ todo;
243
+ </p>
244
+
245
+ <img src="demo\CUITabButton.png" alt="screenshot" width="600"/>
246
+
247
+ ### 🧱 CUITabControl
248
+
249
+ <p>
250
+ todo;
251
+ </p>
252
+
253
+ <img src="demo\CUITabControl.png" alt="screenshot" width="600"/>
254
+
255
+ ### 🧱 CUITrackBar
256
+
257
+ <p>
258
+ Generic slider used for settings adjustments. Useful to set configs in specific range.
259
+ </p>
260
+
261
+ <img src="demo\CUITrackBar.png" alt="screenshot" width="600"/>
262
+
263
+ ### 🧱 CUITextWnd
264
+
265
+ <p>
266
+ todo;
267
+ </p>
268
+
269
+ <img src="demo\CUITextWnd.png" alt="screenshot" width="600"/>
270
+
271
+ ### 🧱 CServerList
272
+
273
+ <p>
274
+ Default UI modal element for multiplayer list of servers display.
275
+ </p>
276
+
277
+ <img src="demo\CServerList.png" alt="screenshot" width="600"/>
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,185 @@
1
+ declare module "xray16" {
2
+ /**
3
+ * @source C++ class COptionsManager
4
+ * @customConstructor COptionsManager
5
+ * @group xr_ui_core
6
+ */
7
+ export class COptionsManager {
8
+ public constructor();
9
+
10
+ public SendMessage2Group(group: string, message: string): void;
11
+ public UndoGroup(group: string): void;
12
+ public SaveBackupValues(group: string): void;
13
+ public IsGroupChanged(group: string): boolean;
14
+ public SaveValues(group: string): void;
15
+ public SetCurrentValues(group: string): void;
16
+ public NeedSystemRestart(): boolean;
17
+ public NeedVidRestart(): boolean;
18
+ public OptionsPostAccept(): void;
19
+ }
20
+
21
+ /**
22
+ * @source C++ class CMainMenu
23
+ * @customConstructor CMainMenu
24
+ * @group xr_ui_core
25
+ */
26
+ export class CMainMenu {
27
+ public GetCDKey(): string;
28
+ public GetAccountMngr(): account_manager;
29
+ public GetDemoInfo(fileName: string): demo_info | null;
30
+ public GetPatchProgress(): Patch_Dawnload_Progress;
31
+ public GetProfileStore(): profile_store;
32
+ public GetGSVer(): string;
33
+ public GetLoginMngr(): login_manager;
34
+ public GetPlayerName(): string;
35
+ public CancelDownload(): void;
36
+ public ValidateCDKey(): boolean;
37
+ }
38
+
39
+ /**
40
+ * @source C++ class CUIGameCustom
41
+ * @customConstructor CUIGameCustom
42
+ * @group xr_ui_core
43
+ */
44
+ export class CUIGameCustom {
45
+ public AddCustomStatic(id: string, b: boolean): StaticDrawableWrapper;
46
+ public AddCustomStatic(id: string, b: boolean, n: f32): StaticDrawableWrapper;
47
+ public AddDialogToRender(window: CUIWindow): void;
48
+ public CurrentItemAtCell(): game_object;
49
+ public GetCustomStatic(value: string): StaticDrawableWrapper | null;
50
+ public HideActorMenu(): void;
51
+ public ShowActorMenu(): boolean;
52
+ public HidePdaMenu(): void;
53
+ public RemoveCustomStatic(id: string): void;
54
+ public RemoveDialogToRender(window: CUIWindow): void;
55
+ public UpdateActorMenu(): void;
56
+ public enable_fake_indicators(enabled: boolean): void;
57
+ public hide_messages(): void;
58
+ public show_messages(): void;
59
+ public update_fake_indicators(u8: number, enabled: boolean): void;
60
+ public update_fake_indicators(u8: number, value: f32): void;
61
+ }
62
+
63
+ /**
64
+ * @source C++ class CScriptXmlInit
65
+ * @customConstructor CScriptXmlInit
66
+ * @group xr_ui_core
67
+ */
68
+ export class CScriptXmlInit {
69
+ public constructor();
70
+
71
+ public ParseFile(path: string): void;
72
+ public ParseShTexInfo(path: string): void;
73
+
74
+ public Init3tButton(selector: string, window: CUIWindow | null): CUI3tButton;
75
+ public InitAnimStatic(selector: string, window: CUIWindow | null): CUIStatic;
76
+ public InitCDkey(selector: string, window: CUIWindow | null): CUIEditBox;
77
+ public InitCheck(selector: string, window: CUIWindow | null): CUICheckButton;
78
+ public InitComboBox(selector: string, window: CUIWindow | null): CUIComboBox;
79
+ public InitEditBox(selector: string, window: CUIWindow | null): CUIEditBox;
80
+ public InitFrame(selector: string, window: CUIWindow | null): CUIFrameWindow;
81
+ public InitFrameLine(selector: string, window: CUIWindow | null): CUIFrameLineWnd;
82
+ public InitKeyBinding(selector: string, window: CUIWindow | null): CUIWindow;
83
+ public InitLabel(selector: string, window: CUIWindow | null): CUIStatic;
84
+ public InitList(selector: string, window: CUIWindow | null): CUIListWnd;
85
+ public InitListBox<T extends CUIListBoxItem = CUIListBoxItem>(
86
+ selector: string,
87
+ window: CUIWindow | null
88
+ ): CUIListBox<T>;
89
+ public InitMMShniaga(selector: string, window: CUIWindow | null): CUIMMShniaga;
90
+ public InitMPPlayerName(selector: string, window: CUIWindow | null): CUIEditBox;
91
+ public InitMapInfo(selector: string, window: CUIWindow | null): CUIMapInfo;
92
+ public InitMapList(selector: string, window: CUIWindow | null): CUIMapList;
93
+ public InitProgressBar(selector: string, window: CUIWindow | null): CUIProgressBar;
94
+ public InitScrollView(selector: string, window: CUIWindow | null): CUIScrollView;
95
+ public InitServerList(selector: string, window: CUIWindow | null): CServerList;
96
+ public InitSleepStatic(selector: string, window: CUIWindow | null): CUISleepStatic;
97
+ public InitSpinFlt(selector: string, window: CUIWindow | null): CUISpinFlt;
98
+ public InitSpinNum(selector: string, window: CUIWindow | null): CUISpinNum;
99
+ public InitSpinText(selector: string, window: CUIWindow | null): CUISpinText;
100
+ public InitStatic(selector: string, window: CUIWindow | null): CUIStatic;
101
+ public InitTab(selector: string, window: CUIWindow | null): CUITabControl;
102
+ public InitTextWnd(selector: string, window: CUIWindow | null): CUITextWnd;
103
+ public InitTrackBar(selector: string, window: CUIWindow | null): CUITrackBar;
104
+ public InitVerList(selector: string, window: CUIWindow | null): CUIVersionList;
105
+ public InitWindow(selector: string, index: i32, window: CUIWindow | null): void;
106
+ }
107
+
108
+ /**
109
+ * @source C++ class UIStyleManager
110
+ * @customConstructor UIStyleManager
111
+ * @group xr_ui_core
112
+ */
113
+ export class UIStyleManager {
114
+ private constructor();
115
+
116
+ public GetAllStyles(): LuaIterable<token>;
117
+ public DefaultStyleIsSet(): boolean;
118
+ public GetCurrentStyleId(): u32;
119
+ public SetStyle(id: u32, reload_ui?: boolean): void;
120
+ }
121
+
122
+ /**
123
+ * @source C++ class CGameFont
124
+ * @customConstructor CGameFont
125
+ * @group xr_ui_core
126
+ */
127
+ export class CGameFont {
128
+ public static readonly alCenter: 2;
129
+ public static readonly alLeft: 0;
130
+ public static readonly alRight: 1;
131
+
132
+ private constructor();
133
+ }
134
+
135
+ /**
136
+ * EVTextAlignment.
137
+ *
138
+ * @group xr_ui_core
139
+ */
140
+ export type TXR_CGameFont_alignment = EnumeratedStaticsValues<typeof CGameFont>;
141
+
142
+ /**
143
+ * @source C++ class ui_events
144
+ * @customConstructor ui_events
145
+ * @group xr_ui_core
146
+ */
147
+ export class ui_events {
148
+ public static readonly BUTTON_CLICKED: 19;
149
+ public static readonly BUTTON_DOWN: 20;
150
+ public static readonly CHECK_BUTTON_RESET: 23;
151
+ public static readonly CHECK_BUTTON_SET: 22;
152
+ public static readonly EDIT_TEXT_COMMIT: 79;
153
+ public static readonly LIST_ITEM_CLICKED: 37;
154
+ public static readonly LIST_ITEM_SELECT: 38;
155
+ public static readonly LIST_ITEM_UNSELECT: 39;
156
+ public static readonly MAIN_MENU_RELOADED: 84;
157
+ public static readonly MESSAGE_BOX_CANCEL_CLICKED: 47;
158
+ public static readonly MESSAGE_BOX_COPY_CLICKED: 48;
159
+ public static readonly MESSAGE_BOX_NO_CLICKED: 46;
160
+ public static readonly MESSAGE_BOX_OK_CLICKED: 42;
161
+ public static readonly MESSAGE_BOX_QUIT_GAME_CLICKED: 45;
162
+ public static readonly MESSAGE_BOX_QUIT_WIN_CLICKED: 44;
163
+ public static readonly MESSAGE_BOX_YES_CLICKED: 43;
164
+ public static readonly PROPERTY_CLICKED: 41;
165
+ public static readonly RADIOBUTTON_SET: 24;
166
+ public static readonly SCROLLBAR_HSCROLL: 34;
167
+ public static readonly SCROLLBAR_VSCROLL: 33;
168
+ public static readonly SCROLLBOX_MOVE: 32;
169
+ public static readonly TAB_CHANGED: 21;
170
+ public static readonly WINDOW_KEYBOARD_CAPTURE_LOST: 16;
171
+ public static readonly WINDOW_KEY_PRESSED: 12;
172
+ public static readonly WINDOW_KEY_RELEASED: 13;
173
+ public static readonly WINDOW_LBUTTON_DB_CLICK: 11;
174
+ public static readonly WINDOW_LBUTTON_DOWN: 0;
175
+ public static readonly WINDOW_LBUTTON_UP: 3;
176
+ public static readonly WINDOW_MOUSE_MOVE: 6;
177
+ public static readonly WINDOW_RBUTTON_DOWN: 1;
178
+ public static readonly WINDOW_RBUTTON_UP: 4;
179
+ }
180
+
181
+ /**
182
+ * @group xr_ui_core
183
+ */
184
+ type TXR_ui_event = EnumeratedStaticsValues<typeof ui_events>;
185
+ }