stratum-rs-overlay 3.0.0 → 4.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.
- package/README.md +9 -6
- package/dist/index.d.ts +3 -4
- package/dist/index.win32-x64-msvc.node +0 -0
- package/package.json +3 -6
package/README.md
CHANGED
|
@@ -93,13 +93,14 @@ app.whenReady().then(() => {
|
|
|
93
93
|
// eventType: focus | move | blur
|
|
94
94
|
// x, y, width, height, targetName
|
|
95
95
|
console.log('[STRATUM-RS]', event);
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
cursorPollIntervalMs: 100,
|
|
99
|
-
cursorEmitIntervalMs: 100,
|
|
100
|
-
idlePollIntervalMs: 100,
|
|
101
96
|
}
|
|
102
97
|
);
|
|
98
|
+
|
|
99
|
+
stratumOverlay.startMouseTracking(undefined, {
|
|
100
|
+
cursorPollIntervalMs: 100,
|
|
101
|
+
cursorEmitIntervalMs: 100,
|
|
102
|
+
idlePollIntervalMs: 100,
|
|
103
|
+
});
|
|
103
104
|
});
|
|
104
105
|
```
|
|
105
106
|
|
|
@@ -107,7 +108,9 @@ app.whenReady().then(() => {
|
|
|
107
108
|
- `init(licenseKeyHex: string): boolean`
|
|
108
109
|
- `setOverlayPid(pid: number): void`
|
|
109
110
|
- `setOverlayHwnd(hwnd: number): void`
|
|
110
|
-
- `startTracking(targets, callback
|
|
111
|
+
- `startTracking(targets, callback): void`
|
|
112
|
+
- `startMouseTracking(targetName?, options?): boolean`
|
|
113
|
+
- `stopMouseTracking(): boolean`
|
|
111
114
|
- `focusLastTarget(): boolean`
|
|
112
115
|
- `stopTracking(): boolean`
|
|
113
116
|
|
package/dist/index.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export interface OverlayEvent {
|
|
|
19
19
|
width: number
|
|
20
20
|
height: number
|
|
21
21
|
}
|
|
22
|
-
export interface
|
|
22
|
+
export interface MouseTrackingOptions {
|
|
23
23
|
cursorPollIntervalMs?: number
|
|
24
24
|
cursorEmitIntervalMs?: number
|
|
25
25
|
idlePollIntervalMs?: number
|
|
@@ -35,13 +35,12 @@ export declare function setOverlayHwnd(hwnd: number): void
|
|
|
35
35
|
export declare function focusLastTarget(): boolean
|
|
36
36
|
export declare function areKeysPressed(vkCodes: Array<number>): boolean
|
|
37
37
|
export declare function stopMouseTracking(): boolean
|
|
38
|
-
export declare function startMouseTracking(targetName?: string | undefined | null): boolean
|
|
38
|
+
export declare function startMouseTracking(targetName?: string | undefined | null, options?: MouseTrackingOptions | undefined | null): boolean
|
|
39
39
|
export declare function stopTracking(): boolean
|
|
40
40
|
/**
|
|
41
41
|
* Start Tracking
|
|
42
42
|
* @param targets: Vec<TargetConfig>
|
|
43
43
|
* @param callback: ThreadsafeFunction<OverlayEvent, ErrorStrategy::CalleeHandled>
|
|
44
|
-
* @param options: TrackingOptions (optional)
|
|
45
44
|
* @return Result<()>
|
|
46
45
|
*/
|
|
47
|
-
export declare function startTracking(targets: Array<TargetConfig>, callback: (err: Error | null, event?: OverlayEvent) => void
|
|
46
|
+
export declare function startTracking(targets: Array<TargetConfig>, callback: (err: Error | null, event?: OverlayEvent) => void): void
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stratum-rs-overlay",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "A high-performance, non-intrusive game overlay library for Electron powered by Rust.",
|
|
5
5
|
"os": [
|
|
6
6
|
"win32"
|
|
@@ -36,16 +36,13 @@
|
|
|
36
36
|
"@napi-rs/cli": "^2.18.4",
|
|
37
37
|
"dotenv": "^17.2.3",
|
|
38
38
|
"electron": "^40.0.0",
|
|
39
|
-
"shx": "^0.4.0"
|
|
39
|
+
"shx": "^0.4.0",
|
|
40
|
+
"tweetnacl": "^1.0.3"
|
|
40
41
|
},
|
|
41
42
|
"napi": {
|
|
42
43
|
"binaryName": "index",
|
|
43
44
|
"targets": [
|
|
44
45
|
"x86_64-pc-windows-msvc"
|
|
45
46
|
]
|
|
46
|
-
},
|
|
47
|
-
"dependencies": {
|
|
48
|
-
"stratum-rs-overlay": "^1.0.5",
|
|
49
|
-
"tweetnacl": "^1.0.3"
|
|
50
47
|
}
|
|
51
48
|
}
|