@overlayed/app 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +464 -944
- package/dist/index.js +27 -7916
- package/dist/preload.d.ts +1 -1
- package/dist/preload.js +1 -4
- package/dist/siege.d.ts +3264 -2911
- package/dist/siege.js +1 -650
- package/package.json +13 -10
package/dist/index.d.ts
CHANGED
|
@@ -1,944 +1,464 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
*
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
*
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
* Submits info you provide, app logs, overlayed logs, and any additional files you provide to be viewed
|
|
466
|
-
* in your Overlayed dashboard.
|
|
467
|
-
*
|
|
468
|
-
* @param info - The information to include in the bug report.
|
|
469
|
-
* @param options - The options to include in the bug report.
|
|
470
|
-
* @returns The bug report id.
|
|
471
|
-
*/
|
|
472
|
-
submitBugReport: (
|
|
473
|
-
info: OverlayedAppLoggingModuleInfo,
|
|
474
|
-
options?: OverlayedAppLoggingModuleSubmitBugReportOptions,
|
|
475
|
-
) => Promise<
|
|
476
|
-
Result<
|
|
477
|
-
true,
|
|
478
|
-
{
|
|
479
|
-
message: string;
|
|
480
|
-
error: unknown;
|
|
481
|
-
}
|
|
482
|
-
>
|
|
483
|
-
>;
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
declare interface OverlayedAppLoggingModuleInfo extends Record<string, string | undefined> {
|
|
487
|
-
email?: string;
|
|
488
|
-
username?: string;
|
|
489
|
-
message?: string;
|
|
490
|
-
category?: string;
|
|
491
|
-
version?: string;
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
declare interface OverlayedAppLoggingModuleSubmitBugReportOptions {
|
|
495
|
-
/**
|
|
496
|
-
* A key value record of additional files to include in the bug report.
|
|
497
|
-
*
|
|
498
|
-
* The key is the name of the file, and the value is the content of the file.
|
|
499
|
-
*/
|
|
500
|
-
additionalFiles?: Record<string, string>;
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
declare interface OverlayedAppWindowsModule
|
|
504
|
-
extends Pick<
|
|
505
|
-
RenderInterface,
|
|
506
|
-
| "on"
|
|
507
|
-
| "off"
|
|
508
|
-
| "once"
|
|
509
|
-
| "addListener"
|
|
510
|
-
| "prependListener"
|
|
511
|
-
| "prependOnceListener"
|
|
512
|
-
| "removeListener"
|
|
513
|
-
| "removeAllListeners"
|
|
514
|
-
> {
|
|
515
|
-
createWindow(options: RenderWindowConstructorOptions): RenderWindow;
|
|
516
|
-
getActiveGameInfo: () => ActiveGameInfo;
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
declare interface OverlayedOptions<TModule extends GameModule, TKeybind extends string> {
|
|
520
|
-
/**
|
|
521
|
-
* The electron instance.
|
|
522
|
-
*
|
|
523
|
-
* Must be imported globally like:
|
|
524
|
-
* ```ts
|
|
525
|
-
* import { electron } from "electron";
|
|
526
|
-
* ```
|
|
527
|
-
* or
|
|
528
|
-
* ```ts
|
|
529
|
-
* const electron = require("electron");
|
|
530
|
-
* ```
|
|
531
|
-
*/
|
|
532
|
-
electron: electron;
|
|
533
|
-
/**
|
|
534
|
-
* The application id, this can be found in the [Overlayed Dashboard](https://dashboard.overlayed.gg/settings/applications).
|
|
535
|
-
*/
|
|
536
|
-
applicationId: string;
|
|
537
|
-
/**
|
|
538
|
-
* App modules to load.
|
|
539
|
-
*/
|
|
540
|
-
modules: TModule[];
|
|
541
|
-
/**
|
|
542
|
-
* App keybinds config.
|
|
543
|
-
*/
|
|
544
|
-
keybinds: OverlayedAppKeybindsConfig<TKeybind>;
|
|
545
|
-
/**
|
|
546
|
-
* Whether to initialize the app when the module is loaded.
|
|
547
|
-
* @default true;
|
|
548
|
-
*/
|
|
549
|
-
init?: boolean;
|
|
550
|
-
/**
|
|
551
|
-
* When true, the overlay will be loaded for all supported games.
|
|
552
|
-
* When false, only games registered under the `modules` array will be loaded.
|
|
553
|
-
*
|
|
554
|
-
* @default false
|
|
555
|
-
*/
|
|
556
|
-
universal?: boolean;
|
|
557
|
-
/**
|
|
558
|
-
* @deprecated
|
|
559
|
-
*/
|
|
560
|
-
channel?: string;
|
|
561
|
-
/**
|
|
562
|
-
* The version of the app.
|
|
563
|
-
*
|
|
564
|
-
* @deprecated
|
|
565
|
-
*/
|
|
566
|
-
version?: string;
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
declare class OverridesManager extends Manager {
|
|
570
|
-
private renderInterface;
|
|
571
|
-
private globalCursorOverrideCount;
|
|
572
|
-
private globalMouseBlockCount;
|
|
573
|
-
private globalKeyboardBlockCount;
|
|
574
|
-
private keyInputBlocks;
|
|
575
|
-
constructor(interfaceName: RenderInterfaceName);
|
|
576
|
-
scope(scopeName: string): OverridesManagerScope;
|
|
577
|
-
private setGlobalCursorOverride;
|
|
578
|
-
private setGlobalMouseBlock;
|
|
579
|
-
private setGlobalKeyboardBlock;
|
|
580
|
-
private setKeyInputBlock;
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
export declare interface OverridesManagerScope {
|
|
584
|
-
setGlobalCursorOverride: (override: boolean) => void;
|
|
585
|
-
setGlobalMouseBlock: (block: boolean) => void;
|
|
586
|
-
setGlobalKeyboardBlock: (block: boolean) => void;
|
|
587
|
-
setKeyInputBlock: (key: number, block: boolean) => void;
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
export class RenderInterface {
|
|
591
|
-
constructor(name: String, options?: { maxWindowCount?: number; eventQueueSize?: number; access?: AccessLevel }); // default: { maxWindowCount: 10, eventQueueSize: 200, access: AccessLevel.Default }
|
|
592
|
-
|
|
593
|
-
newWindowInternal(browserWindow: Electron.BrowserWindow, options?: RenderWindowConstructorOptions): RenderWindow;
|
|
594
|
-
|
|
595
|
-
getGlobalMouseBlock(): boolean;
|
|
596
|
-
getGlobalKeyboardBlock(): boolean;
|
|
597
|
-
getGlobalCursorOverride(): boolean;
|
|
598
|
-
getKeyInputBlock(key: VirtualKey): boolean;
|
|
599
|
-
|
|
600
|
-
setGlobalMouseBlock(block: boolean): void;
|
|
601
|
-
setGlobalKeyboardBlock(block: boolean): void;
|
|
602
|
-
setGlobalCursorOverride(show: boolean): void;
|
|
603
|
-
setKeyInputBlock(key: VirtualKey, block: boolean): void;
|
|
604
|
-
|
|
605
|
-
eventNames(): string[];
|
|
606
|
-
getMaxListeners(): number;
|
|
607
|
-
removeAllListeners(): this;
|
|
608
|
-
|
|
609
|
-
listeners(eventName: "keyDown"): Function[];
|
|
610
|
-
rawListeners(eventName: "keyDown"): Function[];
|
|
611
|
-
listenerCount(eventName: "keyDown", listener?: (event: KeyboardKeyEvent) => void): number;
|
|
612
|
-
|
|
613
|
-
on(eventName: "keyDown", listener: (event: KeyboardKeyEvent) => void): this;
|
|
614
|
-
once(eventName: "keyDown", listener: (event: KeyboardKeyEvent) => void): this;
|
|
615
|
-
addListener(eventName: "keyDown", listener: (event: KeyboardKeyEvent) => void): this;
|
|
616
|
-
prependListener(eventName: "keyDown", listener: (event: KeyboardKeyEvent) => void): this;
|
|
617
|
-
prependOnceListener(eventName: "keyDown", listener: (event: KeyboardKeyEvent) => void): this;
|
|
618
|
-
|
|
619
|
-
off(eventName: "keyDown", listener: (event: KeyboardKeyEvent) => void): this;
|
|
620
|
-
removeListener(eventName: "keyDown", listener: (event: KeyboardKeyEvent) => void): this;
|
|
621
|
-
removeAllListeners(eventName: "keyDown"): this;
|
|
622
|
-
|
|
623
|
-
listeners(eventName: "keyUp"): Function[];
|
|
624
|
-
rawListeners(eventName: "keyUp"): Function[];
|
|
625
|
-
listenerCount(eventName: "keyUp", listener?: (event: KeyboardKeyEvent) => void): number;
|
|
626
|
-
|
|
627
|
-
on(eventName: "keyUp", listener: (event: KeyboardKeyEvent) => void): this;
|
|
628
|
-
once(eventName: "keyUp", listener: (event: KeyboardKeyEvent) => void): this;
|
|
629
|
-
addListener(eventName: "keyUp", listener: (event: KeyboardKeyEvent) => void): this;
|
|
630
|
-
prependListener(eventName: "keyUp", listener: (event: KeyboardKeyEvent) => void): this;
|
|
631
|
-
prependOnceListener(eventName: "keyUp", listener: (event: KeyboardKeyEvent) => void): this;
|
|
632
|
-
|
|
633
|
-
off(eventName: "keyUp", listener: (event: KeyboardKeyEvent) => void): this;
|
|
634
|
-
removeListener(eventName: "keyUp", listener: (event: KeyboardKeyEvent) => void): this;
|
|
635
|
-
removeAllListeners(eventName: "keyUp"): this;
|
|
636
|
-
|
|
637
|
-
listeners(eventName: "mouseDown"): Function[];
|
|
638
|
-
rawListeners(eventName: "mouseDown"): Function[];
|
|
639
|
-
listenerCount(eventName: "mouseDown", listener?: (event: MouseButtonEvent) => void): number;
|
|
640
|
-
|
|
641
|
-
on(eventName: "mouseDown", listener: (event: MouseButtonEvent) => void): this;
|
|
642
|
-
once(eventName: "mouseDown", listener: (event: MouseButtonEvent) => void): this;
|
|
643
|
-
addListener(eventName: "mouseDown", listener: (event: MouseButtonEvent) => void): this;
|
|
644
|
-
prependListener(eventName: "mouseDown", listener: (event: MouseButtonEvent) => void): this;
|
|
645
|
-
prependOnceListener(eventName: "mouseDown", listener: (event: MouseButtonEvent) => void): this;
|
|
646
|
-
|
|
647
|
-
off(eventName: "mouseDown", listener: (event: MouseButtonEvent) => void): this;
|
|
648
|
-
removeListener(eventName: "mouseDown", listener: (event: MouseButtonEvent) => void): this;
|
|
649
|
-
removeAllListeners(eventName: "mouseDown"): this;
|
|
650
|
-
|
|
651
|
-
listeners(eventName: "mouseUp"): Function[];
|
|
652
|
-
rawListeners(eventName: "mouseUp"): Function[];
|
|
653
|
-
listenerCount(eventName: "mouseUp", listener?: (event: MouseButtonEvent) => void): number;
|
|
654
|
-
|
|
655
|
-
on(eventName: "mouseUp", listener: (event: MouseButtonEvent) => void): this;
|
|
656
|
-
once(eventName: "mouseUp", listener: (event: MouseButtonEvent) => void): this;
|
|
657
|
-
addListener(eventName: "mouseUp", listener: (event: MouseButtonEvent) => void): this;
|
|
658
|
-
prependListener(eventName: "mouseUp", listener: (event: MouseButtonEvent) => void): this;
|
|
659
|
-
prependOnceListener(eventName: "mouseUp", listener: (event: MouseButtonEvent) => void): this;
|
|
660
|
-
|
|
661
|
-
off(eventName: "mouseUp", listener: (event: MouseButtonEvent) => void): this;
|
|
662
|
-
removeListener(eventName: "mouseUp", listener: (event: MouseButtonEvent) => void): this;
|
|
663
|
-
removeAllListeners(eventName: "mouseUp"): this;
|
|
664
|
-
|
|
665
|
-
listeners(eventName: "resolution"): Function[];
|
|
666
|
-
rawListeners(eventName: "resolution"): Function[];
|
|
667
|
-
listenerCount(eventName: "resolution", listener?: (width: number, height: number) => void): number;
|
|
668
|
-
|
|
669
|
-
on(eventName: "resolution", listener: (width: number, height: number) => void): this;
|
|
670
|
-
once(eventName: "resolution", listener: (width: number, height: number) => void): this;
|
|
671
|
-
addListener(eventName: "resolution", listener: (width: number, height: number) => void): this;
|
|
672
|
-
prependListener(eventName: "resolution", listener: (width: number, height: number) => void): this;
|
|
673
|
-
prependOnceListener(eventName: "resolution", listener: (width: number, height: number) => void): this;
|
|
674
|
-
|
|
675
|
-
off(eventName: "resolution", listener: (width: number, height: number) => void): this;
|
|
676
|
-
removeListener(eventName: "resolution", listener: (width: number, height: number) => void): this;
|
|
677
|
-
removeAllListeners(eventName: "resolution"): this;
|
|
678
|
-
|
|
679
|
-
listeners(eventName: "keyboardFocus"): Function[];
|
|
680
|
-
rawListeners(eventName: "keyboardFocus"): Function[];
|
|
681
|
-
listenerCount(eventName: "keyboardFocus", listener?: (focus: boolean) => void): number;
|
|
682
|
-
|
|
683
|
-
on(eventName: "keyboardFocus", listener: (focus: boolean) => void): this;
|
|
684
|
-
once(eventName: "keyboardFocus", listener: (focus: boolean) => void): this;
|
|
685
|
-
addListener(eventName: "keyboardFocus", listener: (focus: boolean) => void): this;
|
|
686
|
-
prependListener(eventName: "keyboardFocus", listener: (focus: boolean) => void): this;
|
|
687
|
-
prependOnceListener(eventName: "keyboardFocus", listener: (focus: boolean) => void): this;
|
|
688
|
-
|
|
689
|
-
off(eventName: "keyboardFocus", listener: (focus: boolean) => void): this;
|
|
690
|
-
removeListener(eventName: "keyboardFocus", listener: (focus: boolean) => void): this;
|
|
691
|
-
removeAllListeners(eventName: "keyboardFocus"): this;
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
declare type RenderInterfaceName = "OGG_SIEGE";
|
|
695
|
-
|
|
696
|
-
export interface RenderWindow extends Electron.BrowserWindow {
|
|
697
|
-
getLayer(): number;
|
|
698
|
-
getInput(): boolean;
|
|
699
|
-
getInputBlock(): boolean;
|
|
700
|
-
getCursorOverride(): boolean;
|
|
701
|
-
|
|
702
|
-
setLayer(layer: number): void;
|
|
703
|
-
setInput(input: boolean): void;
|
|
704
|
-
setInputBlock(block: boolean): void;
|
|
705
|
-
setCursorOverride(override: boolean): void;
|
|
706
|
-
}
|
|
707
|
-
|
|
708
|
-
export interface RenderWindowConstructorOptions extends Electron.BrowserWindowConstructorOptions {
|
|
709
|
-
layer?: number; // default: 0
|
|
710
|
-
|
|
711
|
-
createForeground?: boolean; // default: true
|
|
712
|
-
|
|
713
|
-
hasInput?: boolean; // default: true
|
|
714
|
-
hasInputBlock?: boolean; // default: true
|
|
715
|
-
hasCursorOverride?: boolean; // default: true
|
|
716
|
-
}
|
|
717
|
-
|
|
718
|
-
declare type Result<T, E = string> = [T, undefined] | [undefined, E];
|
|
719
|
-
|
|
720
|
-
export declare function setFetchLatestTokenCallback(newFetchLatestToken: () => Promise<unknown> | undefined): void;
|
|
721
|
-
|
|
722
|
-
export declare function setUpdaterTokenResolver(newTokenResolver: () => string | undefined): void;
|
|
723
|
-
|
|
724
|
-
export const enum VirtualKey {
|
|
725
|
-
LeftButton = 0x01,
|
|
726
|
-
RightButton = 0x02,
|
|
727
|
-
Cancel = 0x03,
|
|
728
|
-
MiddleButton = 0x04,
|
|
729
|
-
ExtraButton1 = 0x05,
|
|
730
|
-
ExtraButton2 = 0x06,
|
|
731
|
-
Back = 0x08,
|
|
732
|
-
Tab = 0x09,
|
|
733
|
-
Clear = 0x0c,
|
|
734
|
-
Return = 0x0d,
|
|
735
|
-
Shift = 0x10,
|
|
736
|
-
Control = 0x11,
|
|
737
|
-
Menu = 0x12,
|
|
738
|
-
Pause = 0x13,
|
|
739
|
-
CapsLock = 0x14,
|
|
740
|
-
Kana = 0x15,
|
|
741
|
-
Hangeul = 0x15,
|
|
742
|
-
Hangul = 0x15,
|
|
743
|
-
Junja = 0x17,
|
|
744
|
-
Final = 0x18,
|
|
745
|
-
Hanja = 0x19,
|
|
746
|
-
Kanji = 0x19,
|
|
747
|
-
Escape = 0x1b,
|
|
748
|
-
Convert = 0x1c,
|
|
749
|
-
NonConvert = 0x1d,
|
|
750
|
-
Accept = 0x1e,
|
|
751
|
-
ModeChange = 0x1f,
|
|
752
|
-
Space = 0x20,
|
|
753
|
-
Prior = 0x21,
|
|
754
|
-
Next = 0x22,
|
|
755
|
-
End = 0x23,
|
|
756
|
-
Home = 0x24,
|
|
757
|
-
Left = 0x25,
|
|
758
|
-
Up = 0x26,
|
|
759
|
-
Right = 0x27,
|
|
760
|
-
Down = 0x28,
|
|
761
|
-
Select = 0x29,
|
|
762
|
-
Print = 0x2a,
|
|
763
|
-
Execute = 0x2b,
|
|
764
|
-
Snapshot = 0x2c,
|
|
765
|
-
Insert = 0x2d,
|
|
766
|
-
Delete = 0x2e,
|
|
767
|
-
Help = 0x2f,
|
|
768
|
-
N0 = 0x30,
|
|
769
|
-
N1 = 0x31,
|
|
770
|
-
N2 = 0x32,
|
|
771
|
-
N3 = 0x33,
|
|
772
|
-
N4 = 0x34,
|
|
773
|
-
N5 = 0x35,
|
|
774
|
-
N6 = 0x36,
|
|
775
|
-
N7 = 0x37,
|
|
776
|
-
N8 = 0x38,
|
|
777
|
-
N9 = 0x39,
|
|
778
|
-
A = 0x41,
|
|
779
|
-
B = 0x42,
|
|
780
|
-
C = 0x43,
|
|
781
|
-
D = 0x44,
|
|
782
|
-
E = 0x45,
|
|
783
|
-
F = 0x46,
|
|
784
|
-
G = 0x47,
|
|
785
|
-
H = 0x48,
|
|
786
|
-
I = 0x49,
|
|
787
|
-
J = 0x4a,
|
|
788
|
-
K = 0x4b,
|
|
789
|
-
L = 0x4c,
|
|
790
|
-
M = 0x4d,
|
|
791
|
-
N = 0x4e,
|
|
792
|
-
O = 0x4f,
|
|
793
|
-
P = 0x50,
|
|
794
|
-
Q = 0x51,
|
|
795
|
-
R = 0x52,
|
|
796
|
-
S = 0x53,
|
|
797
|
-
T = 0x54,
|
|
798
|
-
U = 0x55,
|
|
799
|
-
V = 0x56,
|
|
800
|
-
W = 0x57,
|
|
801
|
-
X = 0x58,
|
|
802
|
-
Y = 0x59,
|
|
803
|
-
Z = 0x5a,
|
|
804
|
-
LeftWindows = 0x5b,
|
|
805
|
-
RightWindows = 0x5c,
|
|
806
|
-
Application = 0x5d,
|
|
807
|
-
Sleep = 0x5f,
|
|
808
|
-
Numpad0 = 0x60,
|
|
809
|
-
Numpad1 = 0x61,
|
|
810
|
-
Numpad2 = 0x62,
|
|
811
|
-
Numpad3 = 0x63,
|
|
812
|
-
Numpad4 = 0x64,
|
|
813
|
-
Numpad5 = 0x65,
|
|
814
|
-
Numpad6 = 0x66,
|
|
815
|
-
Numpad7 = 0x67,
|
|
816
|
-
Numpad8 = 0x68,
|
|
817
|
-
Numpad9 = 0x69,
|
|
818
|
-
Multiply = 0x6a,
|
|
819
|
-
Add = 0x6b,
|
|
820
|
-
Separator = 0x6c,
|
|
821
|
-
Subtract = 0x6d,
|
|
822
|
-
Decimal = 0x6e,
|
|
823
|
-
Divide = 0x6f,
|
|
824
|
-
F1 = 0x70,
|
|
825
|
-
F2 = 0x71,
|
|
826
|
-
F3 = 0x72,
|
|
827
|
-
F4 = 0x73,
|
|
828
|
-
F5 = 0x74,
|
|
829
|
-
F6 = 0x75,
|
|
830
|
-
F7 = 0x76,
|
|
831
|
-
F8 = 0x77,
|
|
832
|
-
F9 = 0x78,
|
|
833
|
-
F10 = 0x79,
|
|
834
|
-
F11 = 0x7a,
|
|
835
|
-
F12 = 0x7b,
|
|
836
|
-
F13 = 0x7c,
|
|
837
|
-
F14 = 0x7d,
|
|
838
|
-
F15 = 0x7e,
|
|
839
|
-
F16 = 0x7f,
|
|
840
|
-
F17 = 0x80,
|
|
841
|
-
F18 = 0x81,
|
|
842
|
-
F19 = 0x82,
|
|
843
|
-
F20 = 0x83,
|
|
844
|
-
F21 = 0x84,
|
|
845
|
-
F22 = 0x85,
|
|
846
|
-
F23 = 0x86,
|
|
847
|
-
F24 = 0x87,
|
|
848
|
-
NumLock = 0x90,
|
|
849
|
-
ScrollLock = 0x91,
|
|
850
|
-
NEC_Equal = 0x92,
|
|
851
|
-
Fujitsu_Jisho = 0x92,
|
|
852
|
-
Fujitsu_Masshou = 0x93,
|
|
853
|
-
Fujitsu_Touroku = 0x94,
|
|
854
|
-
Fujitsu_Loya = 0x95,
|
|
855
|
-
Fujitsu_Roya = 0x96,
|
|
856
|
-
LeftShift = 0xa0,
|
|
857
|
-
RightShift = 0xa1,
|
|
858
|
-
LeftControl = 0xa2,
|
|
859
|
-
RightControl = 0xa3,
|
|
860
|
-
LeftMenu = 0xa4,
|
|
861
|
-
RightMenu = 0xa5,
|
|
862
|
-
BrowserBack = 0xa6,
|
|
863
|
-
BrowserForward = 0xa7,
|
|
864
|
-
BrowserRefresh = 0xa8,
|
|
865
|
-
BrowserStop = 0xa9,
|
|
866
|
-
BrowserSearch = 0xaa,
|
|
867
|
-
BrowserFavorites = 0xab,
|
|
868
|
-
BrowserHome = 0xac,
|
|
869
|
-
VolumeMute = 0xad,
|
|
870
|
-
VolumeDown = 0xae,
|
|
871
|
-
VolumeUp = 0xaf,
|
|
872
|
-
MediaNextTrack = 0xb0,
|
|
873
|
-
MediaPrevTrack = 0xb1,
|
|
874
|
-
MediaStop = 0xb2,
|
|
875
|
-
MediaPlayPause = 0xb3,
|
|
876
|
-
LaunchMail = 0xb4,
|
|
877
|
-
LaunchMediaSelect = 0xb5,
|
|
878
|
-
LaunchApplication1 = 0xb6,
|
|
879
|
-
LaunchApplication2 = 0xb7,
|
|
880
|
-
OEM1 = 0xba,
|
|
881
|
-
OEMPlus = 0xbb,
|
|
882
|
-
OEMComma = 0xbc,
|
|
883
|
-
OEMMinus = 0xbd,
|
|
884
|
-
OEMPeriod = 0xbe,
|
|
885
|
-
OEM2 = 0xbf,
|
|
886
|
-
OEM3 = 0xc0,
|
|
887
|
-
OEM4 = 0xdb,
|
|
888
|
-
OEM5 = 0xdc,
|
|
889
|
-
OEM6 = 0xdd,
|
|
890
|
-
OEM7 = 0xde,
|
|
891
|
-
OEM8 = 0xdf,
|
|
892
|
-
OEMAX = 0xe1,
|
|
893
|
-
OEM102 = 0xe2,
|
|
894
|
-
ICOHelp = 0xe3,
|
|
895
|
-
ICO00 = 0xe4,
|
|
896
|
-
ProcessKey = 0xe5,
|
|
897
|
-
ICOClear = 0xe6,
|
|
898
|
-
Packet = 0xe7,
|
|
899
|
-
OEMReset = 0xe9,
|
|
900
|
-
OEMJump = 0xea,
|
|
901
|
-
OEMPA1 = 0xeb,
|
|
902
|
-
OEMPA2 = 0xec,
|
|
903
|
-
OEMPA3 = 0xed,
|
|
904
|
-
OEMWSCtrl = 0xee,
|
|
905
|
-
OEMCUSel = 0xef,
|
|
906
|
-
OEMATTN = 0xf0,
|
|
907
|
-
OEMFinish = 0xf1,
|
|
908
|
-
OEMCopy = 0xf2,
|
|
909
|
-
OEMAuto = 0xf3,
|
|
910
|
-
OEMENLW = 0xf4,
|
|
911
|
-
OEMBackTab = 0xf5,
|
|
912
|
-
ATTN = 0xf6,
|
|
913
|
-
CRSel = 0xf7,
|
|
914
|
-
EXSel = 0xf8,
|
|
915
|
-
EREOF = 0xf9,
|
|
916
|
-
Play = 0xfa,
|
|
917
|
-
Zoom = 0xfb,
|
|
918
|
-
Noname = 0xfc,
|
|
919
|
-
PA1 = 0xfd,
|
|
920
|
-
OEMClear = 0xfe,
|
|
921
|
-
}
|
|
922
|
-
|
|
923
|
-
declare type WarningEvents = WarningInvalidEvent;
|
|
924
|
-
|
|
925
|
-
declare interface WarningInvalidEvent extends ErrorManagerEvent {
|
|
926
|
-
code: "INVALID_EVENT";
|
|
927
|
-
data: {
|
|
928
|
-
summary: string;
|
|
929
|
-
};
|
|
930
|
-
}
|
|
931
|
-
|
|
932
|
-
export interface WindowEvent {
|
|
933
|
-
window?: RenderWindow;
|
|
934
|
-
}
|
|
935
|
-
|
|
936
|
-
export {};
|
|
937
|
-
|
|
938
|
-
declare global {
|
|
939
|
-
namespace Electron {
|
|
940
|
-
interface BrowserWindow {
|
|
941
|
-
isShown(): boolean;
|
|
942
|
-
}
|
|
943
|
-
}
|
|
944
|
-
}
|
|
1
|
+
import * as electron0 from "electron";
|
|
2
|
+
import { BrowserWindow } from "electron";
|
|
3
|
+
import { EventCallback, EventType, GameModule, GameModuleEventInfer } from "@overlayed/events";
|
|
4
|
+
import * as arktype_internal_attributes_ts0 from "arktype/internal/attributes.ts";
|
|
5
|
+
import * as arktype_internal_methods_object_ts0 from "arktype/internal/methods/object.ts";
|
|
6
|
+
import { CustomLoggerScope, ErrorManagerEvents } from "@overlayed/utils-node";
|
|
7
|
+
import { GameModel, setUpdaterTokenResolver } from "@overlayed/api";
|
|
8
|
+
import { Process } from "@overlayed-gg/native-interface";
|
|
9
|
+
import { MaybePromise } from "@overlayed/utils";
|
|
10
|
+
import {
|
|
11
|
+
AccessLevel,
|
|
12
|
+
KeyboardKeyEvent,
|
|
13
|
+
MouseButtonEvent,
|
|
14
|
+
RenderInterface,
|
|
15
|
+
RenderInterface as RenderInterface$1,
|
|
16
|
+
RenderWindow,
|
|
17
|
+
RenderWindow as RenderWindow$1,
|
|
18
|
+
RenderWindowConstructorOptions,
|
|
19
|
+
RenderWindowConstructorOptions as RenderWindowConstructorOptions$1,
|
|
20
|
+
VirtualKey,
|
|
21
|
+
WindowEvent,
|
|
22
|
+
} from "@overlayed-gg/render-interface";
|
|
23
|
+
import { RenderInterfaceName } from "@overlayed/native-managers";
|
|
24
|
+
|
|
25
|
+
//#region src/managers/manager.d.ts
|
|
26
|
+
/** This should be kept in sync with EventEmitterManager */
|
|
27
|
+
declare class Manager {
|
|
28
|
+
protected logger: CustomLoggerScope;
|
|
29
|
+
initialized: boolean;
|
|
30
|
+
constructor(name: string);
|
|
31
|
+
init(): void;
|
|
32
|
+
destroy(): void;
|
|
33
|
+
}
|
|
34
|
+
/** This should be kept in sync with Manager */
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region src/managers/keybindManager.d.ts
|
|
37
|
+
type KeybindPressedCallback = () => string | void;
|
|
38
|
+
type KeybindDownCallback = () => string | void;
|
|
39
|
+
type KeybindUpCallback = () => void;
|
|
40
|
+
type KeybindCallbacks = {
|
|
41
|
+
toggle?: KeybindPressedCallback;
|
|
42
|
+
down?: KeybindDownCallback;
|
|
43
|
+
up?: KeybindUpCallback;
|
|
44
|
+
};
|
|
45
|
+
declare const KeybindSchema: arktype_internal_methods_object_ts0.ObjectType<
|
|
46
|
+
{
|
|
47
|
+
[x: string]: {
|
|
48
|
+
keys: string[];
|
|
49
|
+
mode: (In: "toggle" | "hold") => arktype_internal_attributes_ts0.Out<"toggle" | "hold">;
|
|
50
|
+
};
|
|
51
|
+
},
|
|
52
|
+
{}
|
|
53
|
+
>;
|
|
54
|
+
type KeybindSchemaEntry = (typeof KeybindSchema.infer)[string];
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region src/managers/gameLaunchManager.d.ts
|
|
57
|
+
type GameLaunchManagerEvents = {
|
|
58
|
+
gameCloseInternal: (args: { ravenGame: GameModel; process: Process }) => MaybePromise<void>;
|
|
59
|
+
gameLaunch: (args: { game: string; reject: () => void }) => MaybePromise<boolean>;
|
|
60
|
+
gameClose: (args: { game: string }) => MaybePromise<void>;
|
|
61
|
+
gameReady: (args: { game: string }) => MaybePromise<void>;
|
|
62
|
+
gameReadyInternal: (args: { ravenGame: GameModel; process: Process }) => MaybePromise<void>;
|
|
63
|
+
};
|
|
64
|
+
//#endregion
|
|
65
|
+
//#region src/utilities/publicTypes.d.ts
|
|
66
|
+
type ActiveGameInfo = {
|
|
67
|
+
isConnected: boolean;
|
|
68
|
+
resolution: {
|
|
69
|
+
width: number;
|
|
70
|
+
height: number;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
interface OverridesManagerScope {
|
|
74
|
+
setGlobalCursorOverride: (override: boolean) => void;
|
|
75
|
+
setGlobalMouseBlock: (block: boolean) => void;
|
|
76
|
+
setGlobalKeyboardBlock: (block: boolean) => void;
|
|
77
|
+
setKeyInputBlock: (key: number, block: boolean) => void;
|
|
78
|
+
}
|
|
79
|
+
//#endregion
|
|
80
|
+
//#region src/managers/overridesManager.d.ts
|
|
81
|
+
declare class OverridesManager extends Manager {
|
|
82
|
+
private renderInterface;
|
|
83
|
+
private globalCursorOverrideCount;
|
|
84
|
+
private globalMouseBlockCount;
|
|
85
|
+
private globalKeyboardBlockCount;
|
|
86
|
+
private keyInputBlocks;
|
|
87
|
+
constructor(interfaceName: RenderInterfaceName);
|
|
88
|
+
scope(scopeName: string): OverridesManagerScope;
|
|
89
|
+
private setGlobalCursorOverride;
|
|
90
|
+
private setGlobalMouseBlock;
|
|
91
|
+
private setGlobalKeyboardBlock;
|
|
92
|
+
private setKeyInputBlock;
|
|
93
|
+
}
|
|
94
|
+
//#endregion
|
|
95
|
+
//#region src/utilities/types.d.ts
|
|
96
|
+
type OverlayedAppGameModules<TModule extends GameModule> = {
|
|
97
|
+
[TKey in TModule["key"]]: {
|
|
98
|
+
onAny<
|
|
99
|
+
TEvent extends Extract<
|
|
100
|
+
TModule,
|
|
101
|
+
{
|
|
102
|
+
key: TKey;
|
|
103
|
+
}
|
|
104
|
+
>["events"]["event"]["infer"],
|
|
105
|
+
>(
|
|
106
|
+
cb: (data: TEvent) => void,
|
|
107
|
+
): void;
|
|
108
|
+
on<
|
|
109
|
+
TEvent extends Extract<
|
|
110
|
+
TModule,
|
|
111
|
+
{
|
|
112
|
+
key: TKey;
|
|
113
|
+
}
|
|
114
|
+
>["events"]["event"]["infer"],
|
|
115
|
+
TEventType extends EventType<TEvent> = EventType<TEvent>,
|
|
116
|
+
>(
|
|
117
|
+
event: TEventType,
|
|
118
|
+
cb: EventCallback<TEvent, TEventType>,
|
|
119
|
+
): void;
|
|
120
|
+
offAny<
|
|
121
|
+
TEvent extends Extract<
|
|
122
|
+
TModule,
|
|
123
|
+
{
|
|
124
|
+
key: TKey;
|
|
125
|
+
}
|
|
126
|
+
>["events"]["event"]["infer"],
|
|
127
|
+
>(
|
|
128
|
+
cb: (data: TEvent) => void,
|
|
129
|
+
): void;
|
|
130
|
+
off<
|
|
131
|
+
TEvent extends GameModuleEventInfer<
|
|
132
|
+
Extract<
|
|
133
|
+
TModule,
|
|
134
|
+
{
|
|
135
|
+
key: TKey;
|
|
136
|
+
}
|
|
137
|
+
>
|
|
138
|
+
>,
|
|
139
|
+
TEventType extends EventType<TEvent> = EventType<TEvent>,
|
|
140
|
+
>(
|
|
141
|
+
event: TEventType,
|
|
142
|
+
cb: EventCallback<TEvent, TEventType>,
|
|
143
|
+
): void;
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
type OverlayedAppHandlersMapping = {
|
|
147
|
+
error: (data: ErrorManagerEvents["error"]) => void;
|
|
148
|
+
warning: (data: ErrorManagerEvents["warning"]) => void;
|
|
149
|
+
fatal: (data: ErrorManagerEvents["fatal"]) => void;
|
|
150
|
+
gameLaunch: GameLaunchManagerEvents["gameLaunch"];
|
|
151
|
+
gameClose: GameLaunchManagerEvents["gameClose"];
|
|
152
|
+
gameReady: GameLaunchManagerEvents["gameReady"];
|
|
153
|
+
};
|
|
154
|
+
type OverlayedAppHandlers = {
|
|
155
|
+
on: <TEvent extends keyof OverlayedAppHandlersMapping = keyof OverlayedAppHandlersMapping>(
|
|
156
|
+
event: TEvent,
|
|
157
|
+
cb: OverlayedAppHandlersMapping[TEvent],
|
|
158
|
+
) => void;
|
|
159
|
+
off: <TEvent extends keyof OverlayedAppHandlersMapping = keyof OverlayedAppHandlersMapping>(
|
|
160
|
+
event: TEvent,
|
|
161
|
+
cb: OverlayedAppHandlersMapping[TEvent],
|
|
162
|
+
) => void;
|
|
163
|
+
};
|
|
164
|
+
type OverlayedAppKeybindsConfigMode = "toggle" | "hold";
|
|
165
|
+
type OverlayedAppKeybindsConfigKey =
|
|
166
|
+
| "ControlLeft"
|
|
167
|
+
| "AltLeft"
|
|
168
|
+
| "ShiftLeft"
|
|
169
|
+
| "AltRight"
|
|
170
|
+
| "ControlRight"
|
|
171
|
+
| "ShiftRight"
|
|
172
|
+
| (string & {});
|
|
173
|
+
type OverlayedAppKeybindsConfig<TKeybind extends string> = Record<
|
|
174
|
+
TKeybind,
|
|
175
|
+
{
|
|
176
|
+
/**
|
|
177
|
+
* - An array of [KeyboardEvent#code](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code)
|
|
178
|
+
* - Whatever you configure will be the default value
|
|
179
|
+
* - [Here](https://www.toptal.com/developers/keycode) is a good tool to easily find the codes for a given hotkey
|
|
180
|
+
*/
|
|
181
|
+
keys: OverlayedAppKeybindsConfigKey[];
|
|
182
|
+
/**
|
|
183
|
+
* - `toggle` will trigger the callback when the key is toggled on and off
|
|
184
|
+
* - `hold` will trigger the callback when the key is held down
|
|
185
|
+
* - This can be updated at runtime
|
|
186
|
+
*/
|
|
187
|
+
mode: OverlayedAppKeybindsConfigMode;
|
|
188
|
+
}
|
|
189
|
+
>;
|
|
190
|
+
type OverlayedAppKeybindModule<TKeybind extends string> = Record<
|
|
191
|
+
TKeybind,
|
|
192
|
+
{
|
|
193
|
+
on: <TEvent extends "down" | "up" | "toggle">(event: TEvent, cb: KeybindCallbacks[TEvent]) => void;
|
|
194
|
+
}
|
|
195
|
+
> & {
|
|
196
|
+
/**
|
|
197
|
+
* Get the current user keybinds.
|
|
198
|
+
*/
|
|
199
|
+
getConfig: () => OverlayedAppKeybindsConfig<TKeybind>;
|
|
200
|
+
/**
|
|
201
|
+
* Pause keybind listening. Essential for pausing keybind listening when recording new keybinds.
|
|
202
|
+
*/
|
|
203
|
+
pauseKeybindListening: () => void;
|
|
204
|
+
/**
|
|
205
|
+
* Resume keybind listening. Essential for resuming keybind listening after recording new keybinds.
|
|
206
|
+
*/
|
|
207
|
+
resumeKeybindListening: () => void;
|
|
208
|
+
/**
|
|
209
|
+
* Update a single keybind.
|
|
210
|
+
*
|
|
211
|
+
* @param keybind The keybind to update.
|
|
212
|
+
* @param keybindConfig The new keybind config.
|
|
213
|
+
*/
|
|
214
|
+
updateKeybind: (keybind: TKeybind, keybindConfig: OverlayedAppKeybindsConfig<TKeybind>[TKeybind]) => void;
|
|
215
|
+
/**
|
|
216
|
+
* Bulk update keybinds.
|
|
217
|
+
*
|
|
218
|
+
* @param keybinds The keybinds to update. Keybind keys not provided will not be updated.
|
|
219
|
+
*/
|
|
220
|
+
updateKeybinds: (keybinds: Partial<OverlayedAppKeybindsConfig<TKeybind>>) => void;
|
|
221
|
+
};
|
|
222
|
+
interface OverlayedAppWindowsModule
|
|
223
|
+
extends Pick<
|
|
224
|
+
RenderInterface$1,
|
|
225
|
+
| "on"
|
|
226
|
+
| "off"
|
|
227
|
+
| "once"
|
|
228
|
+
| "addListener"
|
|
229
|
+
| "prependListener"
|
|
230
|
+
| "prependOnceListener"
|
|
231
|
+
| "removeListener"
|
|
232
|
+
| "removeAllListeners"
|
|
233
|
+
> {
|
|
234
|
+
createWindow(options: RenderWindowConstructorOptions$1): RenderWindow$1;
|
|
235
|
+
getActiveGameInfo: () => ActiveGameInfo;
|
|
236
|
+
}
|
|
237
|
+
type OverlayedAppInputModuleRaw = {
|
|
238
|
+
/**
|
|
239
|
+
* Block the game from receiving mouse input.
|
|
240
|
+
*
|
|
241
|
+
* @param block Whether to block mouse input.
|
|
242
|
+
*/
|
|
243
|
+
setGlobalMouseBlock(block: boolean): void;
|
|
244
|
+
/**
|
|
245
|
+
* Block the game from receiving keyboard input.
|
|
246
|
+
*
|
|
247
|
+
* @param block Whether to block keyboard input.
|
|
248
|
+
*/
|
|
249
|
+
setGlobalKeyboardBlock(block: boolean): void;
|
|
250
|
+
/**
|
|
251
|
+
* Show or hide the cursor.
|
|
252
|
+
*
|
|
253
|
+
* @param show Whether to show or hide the cursor.
|
|
254
|
+
*/
|
|
255
|
+
setGlobalCursorOverride(show: boolean): void;
|
|
256
|
+
/**
|
|
257
|
+
* Block the game from receiving input for a specific key.
|
|
258
|
+
*
|
|
259
|
+
* @param key The key to block input for.
|
|
260
|
+
* @param block Whether to block input for the key.
|
|
261
|
+
*/
|
|
262
|
+
setKeyInputBlock(key: VirtualKey, block: boolean): void;
|
|
263
|
+
/**
|
|
264
|
+
* Get the current state of the global mouse block.
|
|
265
|
+
*/
|
|
266
|
+
getGlobalMouseBlock(): boolean;
|
|
267
|
+
/**
|
|
268
|
+
* Get the current state of the global keyboard block.
|
|
269
|
+
*/
|
|
270
|
+
getGlobalKeyboardBlock(): boolean;
|
|
271
|
+
/**
|
|
272
|
+
* Get the current state of the global cursor override.
|
|
273
|
+
*/
|
|
274
|
+
getGlobalCursorOverride(): boolean;
|
|
275
|
+
/**
|
|
276
|
+
* Get the current state of the key input block for a specific key.
|
|
277
|
+
* @param key The key to block input for.
|
|
278
|
+
*/
|
|
279
|
+
getKeyInputBlock(key: VirtualKey): boolean;
|
|
280
|
+
};
|
|
281
|
+
interface OverlayedAppInputModule {
|
|
282
|
+
scope: (scopeName: string) => ReturnType<OverridesManager["scope"]>;
|
|
283
|
+
raw: OverlayedAppInputModuleRaw;
|
|
284
|
+
}
|
|
285
|
+
interface CortexEvents extends Record<string, unknown> {}
|
|
286
|
+
interface OverlayedAppCortexModule {
|
|
287
|
+
track: <TEventName extends keyof CortexEvents>(name: TEventName, data: CortexEvents[TEventName]) => void;
|
|
288
|
+
}
|
|
289
|
+
interface OverlayedAppAdsModule {
|
|
290
|
+
registerWindow(
|
|
291
|
+
window: BrowserWindow,
|
|
292
|
+
options?: {
|
|
293
|
+
linkHandler?: {
|
|
294
|
+
allowHosts?: string[];
|
|
295
|
+
};
|
|
296
|
+
},
|
|
297
|
+
): void;
|
|
298
|
+
}
|
|
299
|
+
interface OverlayedAppLoggingModuleInfo extends Record<string, string | undefined> {
|
|
300
|
+
email?: string;
|
|
301
|
+
username?: string;
|
|
302
|
+
message?: string;
|
|
303
|
+
category?: string;
|
|
304
|
+
version?: string;
|
|
305
|
+
}
|
|
306
|
+
interface OverlayedAppLoggingModuleSubmitBugReportOptions {
|
|
307
|
+
/**
|
|
308
|
+
* A key value record of additional files to include in the bug report.
|
|
309
|
+
*
|
|
310
|
+
* The key is the name of the file, and the value is the content of the file.
|
|
311
|
+
*/
|
|
312
|
+
additionalFiles?: Record<string, string>;
|
|
313
|
+
}
|
|
314
|
+
interface OverlayedAppLoggingModule {
|
|
315
|
+
/**
|
|
316
|
+
* Returns a scoped logging instance. Each message will be prefixed with the scope name.
|
|
317
|
+
*
|
|
318
|
+
* ```ts
|
|
319
|
+
* const scope = overlayed.log.scope("MyScope");
|
|
320
|
+
* scope.info("Hello, world!");
|
|
321
|
+
* // [2025-07-20 01:51:40.969] [log] [MyScope] Hello, world!
|
|
322
|
+
* ```
|
|
323
|
+
*
|
|
324
|
+
* @param scopeName - The name of the scope.
|
|
325
|
+
* @returns The logger scope.
|
|
326
|
+
*/
|
|
327
|
+
scope: (scopeName: string) => LoggerScope;
|
|
328
|
+
info: (message: string) => void;
|
|
329
|
+
warn: (message: string) => void;
|
|
330
|
+
error: (message: string) => void;
|
|
331
|
+
/**
|
|
332
|
+
* Submits info you provide, app logs, overlayed logs, and any additional files you provide to be viewed
|
|
333
|
+
* in your Overlayed dashboard.
|
|
334
|
+
*
|
|
335
|
+
* @param info - The information to include in the bug report.
|
|
336
|
+
* @param options - The options to include in the bug report.
|
|
337
|
+
* @returns The bug report id.
|
|
338
|
+
*/
|
|
339
|
+
submitBugReport: (
|
|
340
|
+
info: OverlayedAppLoggingModuleInfo,
|
|
341
|
+
options?: OverlayedAppLoggingModuleSubmitBugReportOptions,
|
|
342
|
+
) => Promise<
|
|
343
|
+
Result<
|
|
344
|
+
true,
|
|
345
|
+
{
|
|
346
|
+
message: string;
|
|
347
|
+
error: unknown;
|
|
348
|
+
}
|
|
349
|
+
>
|
|
350
|
+
>;
|
|
351
|
+
}
|
|
352
|
+
type OverlayedApp<TModule extends GameModule, TKeybind extends string> = OverlayedAppGameModules<TModule> &
|
|
353
|
+
OverlayedAppHandlers & {
|
|
354
|
+
keybinds: OverlayedAppKeybindModule<TKeybind>;
|
|
355
|
+
windows: OverlayedAppWindowsModule;
|
|
356
|
+
input: OverlayedAppInputModule;
|
|
357
|
+
ads: OverlayedAppAdsModule;
|
|
358
|
+
cortex: OverlayedAppCortexModule;
|
|
359
|
+
log: OverlayedAppLoggingModule;
|
|
360
|
+
/**
|
|
361
|
+
* Returns true if any monitored processes are running.
|
|
362
|
+
*
|
|
363
|
+
* Useful for stopping the overlay from updating when the game is running.
|
|
364
|
+
*/
|
|
365
|
+
hasAnyActiveProcesses: () => boolean;
|
|
366
|
+
/**
|
|
367
|
+
* Initializes the overlayed app.
|
|
368
|
+
*
|
|
369
|
+
* This should only be called once, and is automatically called by default, unless `init: false` is passed:
|
|
370
|
+
* ```ts
|
|
371
|
+
* overlayed({
|
|
372
|
+
* init: false,
|
|
373
|
+
* });
|
|
374
|
+
* ```
|
|
375
|
+
*/
|
|
376
|
+
init: () => void;
|
|
377
|
+
/**
|
|
378
|
+
* Returns true if the overlayed app has been initialized.
|
|
379
|
+
*/
|
|
380
|
+
initialized: boolean;
|
|
381
|
+
};
|
|
382
|
+
interface OverlayedOptions<TModule extends GameModule, TKeybind extends string> {
|
|
383
|
+
/**
|
|
384
|
+
* The electron instance.
|
|
385
|
+
*
|
|
386
|
+
* Must be imported globally like:
|
|
387
|
+
* ```ts
|
|
388
|
+
* import { electron } from "electron";
|
|
389
|
+
* ```
|
|
390
|
+
* or
|
|
391
|
+
* ```ts
|
|
392
|
+
* const electron = require("electron");
|
|
393
|
+
* ```
|
|
394
|
+
*/
|
|
395
|
+
electron: typeof electron0;
|
|
396
|
+
/**
|
|
397
|
+
* The application id, this can be found in the [Overlayed Dashboard](https://dashboard.overlayed.gg/settings/applications).
|
|
398
|
+
*/
|
|
399
|
+
applicationId: string;
|
|
400
|
+
/**
|
|
401
|
+
* App modules to load.
|
|
402
|
+
*/
|
|
403
|
+
modules: TModule[];
|
|
404
|
+
/**
|
|
405
|
+
* App keybinds config.
|
|
406
|
+
*/
|
|
407
|
+
keybinds: OverlayedAppKeybindsConfig<TKeybind>;
|
|
408
|
+
/**
|
|
409
|
+
* Whether to initialize the app when the module is loaded.
|
|
410
|
+
* @default true;
|
|
411
|
+
*/
|
|
412
|
+
init?: boolean;
|
|
413
|
+
/**
|
|
414
|
+
* When true, the overlay will be loaded for all supported games.
|
|
415
|
+
* When false, only games registered under the `modules` array will be loaded.
|
|
416
|
+
*
|
|
417
|
+
* @default false
|
|
418
|
+
*/
|
|
419
|
+
universal?: boolean;
|
|
420
|
+
/**
|
|
421
|
+
* @deprecated
|
|
422
|
+
*/
|
|
423
|
+
channel?: string;
|
|
424
|
+
/**
|
|
425
|
+
* The version of the app.
|
|
426
|
+
*
|
|
427
|
+
* @deprecated
|
|
428
|
+
*/
|
|
429
|
+
version?: string;
|
|
430
|
+
}
|
|
431
|
+
//#endregion
|
|
432
|
+
//#region src/utilities/overlayed.d.ts
|
|
433
|
+
declare function overlayed<TModule extends GameModule, TShortcut extends string>(
|
|
434
|
+
options: OverlayedOptions<TModule, TShortcut>,
|
|
435
|
+
): OverlayedApp<TModule, TShortcut>;
|
|
436
|
+
//#endregion
|
|
437
|
+
//#region src/managers/nativeModuleManager.d.ts
|
|
438
|
+
declare function setFetchLatestTokenCallback(newFetchLatestToken: () => Promise<unknown> | undefined): void;
|
|
439
|
+
//#endregion
|
|
440
|
+
export {
|
|
441
|
+
type AccessLevel,
|
|
442
|
+
ActiveGameInfo,
|
|
443
|
+
type GameLaunchManagerEvents,
|
|
444
|
+
type KeybindSchemaEntry as KeybindConfig,
|
|
445
|
+
type KeyboardKeyEvent,
|
|
446
|
+
type MouseButtonEvent,
|
|
447
|
+
type OverlayedApp,
|
|
448
|
+
OverridesManagerScope,
|
|
449
|
+
type RenderInterface,
|
|
450
|
+
type RenderWindow,
|
|
451
|
+
type RenderWindowConstructorOptions,
|
|
452
|
+
type VirtualKey,
|
|
453
|
+
type WindowEvent,
|
|
454
|
+
overlayed,
|
|
455
|
+
setFetchLatestTokenCallback,
|
|
456
|
+
setUpdaterTokenResolver,
|
|
457
|
+
};
|
|
458
|
+
declare global {
|
|
459
|
+
namespace Electron {
|
|
460
|
+
interface BrowserWindow {
|
|
461
|
+
isShown(): boolean;
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
}
|