@bettergi/types 0.1.0 → 0.1.2
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/index.d.ts +43 -12
- package/{modules → objects}/dispatcher.d.ts +21 -9
- package/{modules → objects}/genshin.d.ts +14 -5
- package/{modules → objects}/globalMethod.d.ts +11 -3
- package/{modules → objects}/http.d.ts +5 -2
- package/{modules → objects}/log.d.ts +4 -4
- package/package.json +1 -1
- package/types/BetterGenshinImpact/Core/Script/Dependence/ServerTime.d.ts +11 -0
- package/types/BetterGenshinImpact/Core/Script/Dependence/Simulator/PostMessage.d.ts +18 -0
- package/{csharp → types}/BetterGenshinImpact/GameTask/AutoDomain/AutoDomainParam.d.ts +3 -1
- package/{csharp → types}/BetterGenshinImpact/GameTask/AutoFight/AutoFightParam.d.ts +3 -1
- package/types/BetterGenshinImpact/GameTask/AutoFight/Config/CombatAvatar.d.ts +33 -0
- package/types/BetterGenshinImpact/GameTask/AutoFight/Model/Avatar.d.ts +171 -0
- package/types/BetterGenshinImpact/GameTask/AutoFight/Model/AvatarActiveCheckContext.d.ts +11 -0
- package/types/BetterGenshinImpact/GameTask/AutoFight/Model/CombatScenes.d.ts +72 -0
- package/types/BetterGenshinImpact/GameTask/AutoFight/Model/MultiGameStatus.d.ts +19 -0
- package/types/BetterGenshinImpact/GameTask/Model/Area/DesktopRegion.d.ts +31 -0
- package/types/BetterGenshinImpact/GameTask/Model/Area/GameCaptureRegion.d.ts +85 -0
- package/types/BetterGenshinImpact/GameTask/Model/Area/ImageRegion.d.ts +104 -0
- package/{csharp → types}/BetterGenshinImpact/GameTask/Model/Area/Region.d.ts +53 -10
- package/{csharp → types}/BetterGenshinImpact/View/Drawable/RectDrawable.d.ts +5 -3
- package/types/Fischless/WindowsInput/IKeyboardSimulator.d.ts +67 -0
- package/types/Fischless/WindowsInput/IMouseSimulator.d.ts +61 -0
- package/{csharp → types}/System/Collections/Generic/List.d.ts +6 -2
- package/types/System/DateTime.d.ts +8 -0
- package/types/System/Exception.d.ts +8 -0
- package/csharp/BetterGenshinImpact/GameTask/Model/Area/ImageRegion.d.ts +0 -67
- /package/{modules → objects}/file.d.ts +0 -0
- /package/{modules → objects}/keyMouseScript.d.ts +0 -0
- /package/{modules → objects}/notification.d.ts +0 -0
- /package/{modules → objects}/pathingScript.d.ts +0 -0
- /package/{modules → objects}/settings.d.ts +0 -0
- /package/{csharp → types}/BetterGenshinImpact/Core/Recognition/OcrEngineTypes.d.ts +0 -0
- /package/{csharp → types}/BetterGenshinImpact/Core/Recognition/RecognitionObject.d.ts +0 -0
- /package/{csharp → types}/BetterGenshinImpact/Core/Recognition/RecognitionTypes.d.ts +0 -0
- /package/{csharp → types}/BetterGenshinImpact/Core/Script/Dependence/Model/RealtimeTimer.d.ts +0 -0
- /package/{csharp → types}/BetterGenshinImpact/Core/Script/Dependence/Model/SoloTask.d.ts +0 -0
- /package/{csharp → types}/BetterGenshinImpact/GameTask/AutoDomain/AutoDomainTask.d.ts +0 -0
- /package/{csharp → types}/BetterGenshinImpact/GameTask/AutoFight/AutoFightTask.d.ts +0 -0
- /package/{csharp → types}/BetterGenshinImpact/GameTask/ISoloTask.d.ts +0 -0
- /package/{csharp → types}/BetterGenshinImpact/GameTask/Model/Area/Converter/INodeConverter.d.ts +0 -0
- /package/{csharp → types}/BetterGenshinImpact/GameTask/Model/BaseTaskParam.d.ts +0 -0
- /package/{csharp → types}/BetterGenshinImpact/Helpers/User32Helper.d.ts +0 -0
- /package/{csharp → types}/BetterGenshinImpact/View/Drawable/DrawContent.d.ts +0 -0
- /package/{csharp → types}/BetterGenshinImpact/View/Drawable/LineDrawable.d.ts +0 -0
- /package/{csharp → types}/Microsoft/Extensions/Localization/IStringLocalizer.d.ts +0 -0
- /package/{csharp → types}/Microsoft/Extensions/Localization/LocalizedString.d.ts +0 -0
- /package/{csharp → types}/SixLabors/ImageSharp/Image.d.ts +0 -0
- /package/{csharp → types}/System/Collections/DictionaryEntry.d.ts +0 -0
- /package/{csharp → types}/System/Collections/Generic/Dictionary.d.ts +0 -0
- /package/{csharp → types}/System/Collections/Generic/ICollection.d.ts +0 -0
- /package/{csharp → types}/System/Collections/Generic/IDictionary.d.ts +0 -0
- /package/{csharp → types}/System/Collections/Generic/IEnumerable.d.ts +0 -0
- /package/{csharp → types}/System/Collections/Generic/IEnumerator.d.ts +0 -0
- /package/{csharp → types}/System/Collections/Generic/IEqualityComparer.d.ts +0 -0
- /package/{csharp → types}/System/Collections/Generic/IList.d.ts +0 -0
- /package/{csharp → types}/System/Collections/Generic/IReadOnlyCollection.d.ts +0 -0
- /package/{csharp → types}/System/Collections/Generic/IReadOnlyDictionary.d.ts +0 -0
- /package/{csharp → types}/System/Collections/Generic/IReadOnlyList.d.ts +0 -0
- /package/{csharp → types}/System/Collections/Generic/KeyValuePair.d.ts +0 -0
- /package/{csharp → types}/System/Collections/ICollection.d.ts +0 -0
- /package/{csharp → types}/System/Collections/IDictionary.d.ts +0 -0
- /package/{csharp → types}/System/Collections/IDictionaryEnumerator.d.ts +0 -0
- /package/{csharp → types}/System/Collections/IEnumerable.d.ts +0 -0
- /package/{csharp → types}/System/Collections/IEnumerator.d.ts +0 -0
- /package/{csharp → types}/System/Collections/IList.d.ts +0 -0
- /package/{csharp → types}/System/DateTimeOffset.d.ts +0 -0
- /package/{csharp → types}/System/Drawing/Bitmap.d.ts +0 -0
- /package/{csharp → types}/System/Drawing/Color.d.ts +0 -0
- /package/{csharp → types}/System/Drawing/Image.d.ts +0 -0
- /package/{csharp → types}/System/Drawing/KnownColor.d.ts +0 -0
- /package/{csharp → types}/System/Drawing/Pen.d.ts +0 -0
- /package/{csharp → types}/System/Globalization/CultureInfo.d.ts +0 -0
- /package/{csharp → types}/System/IAsyncDisposable.d.ts +0 -0
- /package/{csharp → types}/System/IDisposable.d.ts +0 -0
- /package/{csharp → types}/System/IEquatable.d.ts +0 -0
- /package/{csharp → types}/System/Runtime/Serialization/IDeserializationCallback.d.ts +0 -0
- /package/{csharp → types}/System/Runtime/Serialization/ISerializable.d.ts +0 -0
- /package/{csharp → types}/System/Threading/CancellationToken.d.ts +0 -0
- /package/{csharp → types}/System/Threading/CancellationTokenRegistration.d.ts +0 -0
- /package/{csharp → types}/System/Threading/CancellationTokenSource.d.ts +0 -0
- /package/{csharp → types}/System/Threading/ITimer.d.ts +0 -0
- /package/{csharp → types}/System/Threading/Tasks/ValueTask.d.ts +0 -0
- /package/{csharp → types}/System/Threading/WaitHandle.d.ts +0 -0
- /package/{csharp → types}/System/TimeProvider.d.ts +0 -0
- /package/{csharp → types}/System/TimeSpan.d.ts +0 -0
- /package/{csharp → types}/System/Windows/Media/Matrix.d.ts +0 -0
- /package/{csharp → types}/System/Windows/Point.d.ts +0 -0
- /package/{csharp → types}/System/Windows/Vector.d.ts +0 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { Mat, Size } from "mirada/dist/src/types/opencv";
|
|
2
|
+
import "../../../../Fischless/WindowsInput/IMouseSimulator";
|
|
3
|
+
import "../../../../System/Drawing/Pen";
|
|
4
|
+
import "../../../View/Drawable/DrawContent";
|
|
5
|
+
import "../../../View/Drawable/LineDrawable";
|
|
6
|
+
import "../../../View/Drawable/RectDrawable";
|
|
7
|
+
import "./Converter/INodeConverter";
|
|
8
|
+
import "./ImageRegion";
|
|
9
|
+
import "./Region";
|
|
10
|
+
|
|
11
|
+
declare global {
|
|
12
|
+
namespace BetterGenshinImpact.GameTask.Model.Area {
|
|
13
|
+
class GameCaptureRegion extends BetterGenshinImpact.GameTask.Model.Area.ImageRegion {
|
|
14
|
+
convertToRectDrawable(
|
|
15
|
+
x: number,
|
|
16
|
+
y: number,
|
|
17
|
+
w: number,
|
|
18
|
+
h: number
|
|
19
|
+
): BetterGenshinImpact.View.Drawable.RectDrawable;
|
|
20
|
+
// overload
|
|
21
|
+
convertToRectDrawable(
|
|
22
|
+
x: number,
|
|
23
|
+
y: number,
|
|
24
|
+
w: number,
|
|
25
|
+
h: number,
|
|
26
|
+
pen: System.Drawing.Pen | null
|
|
27
|
+
): BetterGenshinImpact.View.Drawable.RectDrawable;
|
|
28
|
+
convertToRectDrawable(
|
|
29
|
+
x: number,
|
|
30
|
+
y: number,
|
|
31
|
+
w: number,
|
|
32
|
+
h: number,
|
|
33
|
+
pen: System.Drawing.Pen | null,
|
|
34
|
+
name: string | null
|
|
35
|
+
): BetterGenshinImpact.View.Drawable.RectDrawable;
|
|
36
|
+
|
|
37
|
+
convertToLineDrawable(
|
|
38
|
+
x: number,
|
|
39
|
+
y: number,
|
|
40
|
+
w: number,
|
|
41
|
+
h: number
|
|
42
|
+
): BetterGenshinImpact.View.Drawable.LineDrawable;
|
|
43
|
+
// overload
|
|
44
|
+
convertToLineDrawable(
|
|
45
|
+
x: number,
|
|
46
|
+
y: number,
|
|
47
|
+
w: number,
|
|
48
|
+
h: number,
|
|
49
|
+
pen: System.Drawing.Pen | null
|
|
50
|
+
): BetterGenshinImpact.View.Drawable.LineDrawable;
|
|
51
|
+
convertToLineDrawable(
|
|
52
|
+
x: number,
|
|
53
|
+
y: number,
|
|
54
|
+
w: number,
|
|
55
|
+
h: number,
|
|
56
|
+
pen: System.Drawing.Pen | null,
|
|
57
|
+
name: string | null
|
|
58
|
+
): BetterGenshinImpact.View.Drawable.LineDrawable;
|
|
59
|
+
|
|
60
|
+
deriveTo1080P(): BetterGenshinImpact.GameTask.Model.Area.ImageRegion;
|
|
61
|
+
|
|
62
|
+
constructor(
|
|
63
|
+
mat: Mat,
|
|
64
|
+
initX: number,
|
|
65
|
+
initY: number,
|
|
66
|
+
owner: BetterGenshinImpact.GameTask.Model.Area.Region | null,
|
|
67
|
+
converter: BetterGenshinImpact.GameTask.Model.Area.Converter.INodeConverter | null,
|
|
68
|
+
drawContent: BetterGenshinImpact.View.Drawable.DrawContent | null
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
static gameRegionClick(posFunc: (size: Size, scaleTo1080PRatio: number) => number[]): void;
|
|
72
|
+
|
|
73
|
+
static gameRegionMove(posFunc: (size: Size, scaleTo1080PRatio: number) => number[]): void;
|
|
74
|
+
|
|
75
|
+
static gameRegionMoveBy(deltaFunc: (size: Size, scaleTo1080PRatio: number) => number[]): void;
|
|
76
|
+
|
|
77
|
+
static gameRegion1080PPosClick(cx: number, cy: number): void;
|
|
78
|
+
|
|
79
|
+
static gameRegion1080PPosMove(cx: number, cy: number): void;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
export import GameCaptureRegion = BetterGenshinImpact.GameTask.Model.Area.GameCaptureRegion;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export {};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { Mat, Rect } from "mirada/dist/src/types/opencv";
|
|
2
|
+
import "../../../../BetterGenshinImpact/Core/Recognition/RecognitionObject";
|
|
3
|
+
import "../../../../BetterGenshinImpact/GameTask/Model/Area/Converter/INodeConverter";
|
|
4
|
+
import "../../../../BetterGenshinImpact/GameTask/Model/Area/Region";
|
|
5
|
+
import "../../../../BetterGenshinImpact/View/Drawable/DrawContent";
|
|
6
|
+
import "../../../../SixLabors/ImageSharp/Image";
|
|
7
|
+
import "../../../../System/Collections/Generic/List";
|
|
8
|
+
|
|
9
|
+
declare global {
|
|
10
|
+
namespace BetterGenshinImpact.GameTask.Model.Area {
|
|
11
|
+
class ImageRegion extends BetterGenshinImpact.GameTask.Model.Area.Region {
|
|
12
|
+
srcMat: Mat;
|
|
13
|
+
|
|
14
|
+
cacheGreyMat: Mat;
|
|
15
|
+
|
|
16
|
+
cacheImage: SixLabors.ImageSharp.Image;
|
|
17
|
+
|
|
18
|
+
deriveCrop(
|
|
19
|
+
x: number,
|
|
20
|
+
y: number,
|
|
21
|
+
w: number,
|
|
22
|
+
h: number
|
|
23
|
+
): BetterGenshinImpact.GameTask.Model.Area.ImageRegion;
|
|
24
|
+
|
|
25
|
+
deriveCrop(rect: Rect): BetterGenshinImpact.GameTask.Model.Area.ImageRegion;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* 在本区域内查找最优识别对象
|
|
29
|
+
* @param ro 识别对象
|
|
30
|
+
* @param successAction 识别成功回调
|
|
31
|
+
* @param failAction 识别失败回调
|
|
32
|
+
*/
|
|
33
|
+
find(
|
|
34
|
+
ro: BetterGenshinImpact.Core.Recognition.RecognitionObject
|
|
35
|
+
): BetterGenshinImpact.GameTask.Model.Area.Region;
|
|
36
|
+
// overload
|
|
37
|
+
find(
|
|
38
|
+
ro: BetterGenshinImpact.Core.Recognition.RecognitionObject,
|
|
39
|
+
successAction: ((region: BetterGenshinImpact.GameTask.Model.Area.Region) => void) | null
|
|
40
|
+
): BetterGenshinImpact.GameTask.Model.Area.Region;
|
|
41
|
+
find(
|
|
42
|
+
ro: BetterGenshinImpact.Core.Recognition.RecognitionObject,
|
|
43
|
+
successAction: ((region: BetterGenshinImpact.GameTask.Model.Area.Region) => void) | null,
|
|
44
|
+
failAction: (() => void) | null
|
|
45
|
+
): BetterGenshinImpact.GameTask.Model.Area.Region;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* 在本区域内查找识别对象,返回所有找到的结果
|
|
49
|
+
* @param ro 识别对象
|
|
50
|
+
* @param successAction 识别成功回调
|
|
51
|
+
* @param failAction 识别失败回调
|
|
52
|
+
* @returns
|
|
53
|
+
*/
|
|
54
|
+
findMulti(
|
|
55
|
+
ro: BetterGenshinImpact.Core.Recognition.RecognitionObject
|
|
56
|
+
): System.Collections.Generic.List<BetterGenshinImpact.GameTask.Model.Area.Region>;
|
|
57
|
+
// overload
|
|
58
|
+
findMulti(
|
|
59
|
+
ro: BetterGenshinImpact.Core.Recognition.RecognitionObject,
|
|
60
|
+
successAction:
|
|
61
|
+
| ((
|
|
62
|
+
regions: System.Collections.Generic.List<BetterGenshinImpact.GameTask.Model.Area.Region>
|
|
63
|
+
) => void)
|
|
64
|
+
| null
|
|
65
|
+
): System.Collections.Generic.List<BetterGenshinImpact.GameTask.Model.Area.Region>;
|
|
66
|
+
findMulti(
|
|
67
|
+
ro: BetterGenshinImpact.Core.Recognition.RecognitionObject,
|
|
68
|
+
successAction:
|
|
69
|
+
| ((
|
|
70
|
+
regions: System.Collections.Generic.List<BetterGenshinImpact.GameTask.Model.Area.Region>
|
|
71
|
+
) => void)
|
|
72
|
+
| null,
|
|
73
|
+
failAction: (() => void) | null
|
|
74
|
+
): System.Collections.Generic.List<BetterGenshinImpact.GameTask.Model.Area.Region>;
|
|
75
|
+
|
|
76
|
+
constructor(mat: Mat, x: number, y: number);
|
|
77
|
+
constructor(
|
|
78
|
+
mat: Mat,
|
|
79
|
+
x: number,
|
|
80
|
+
y: number,
|
|
81
|
+
owner: BetterGenshinImpact.GameTask.Model.Area.Region | null
|
|
82
|
+
);
|
|
83
|
+
// overload
|
|
84
|
+
constructor(
|
|
85
|
+
mat: Mat,
|
|
86
|
+
x: number,
|
|
87
|
+
y: number,
|
|
88
|
+
owner: BetterGenshinImpact.GameTask.Model.Area.Region | null,
|
|
89
|
+
converter: BetterGenshinImpact.GameTask.Model.Area.Converter.INodeConverter | null
|
|
90
|
+
);
|
|
91
|
+
constructor(
|
|
92
|
+
mat: Mat,
|
|
93
|
+
x: number,
|
|
94
|
+
y: number,
|
|
95
|
+
owner: BetterGenshinImpact.GameTask.Model.Area.Region | null,
|
|
96
|
+
converter: BetterGenshinImpact.GameTask.Model.Area.Converter.INodeConverter | null,
|
|
97
|
+
drawContent: BetterGenshinImpact.View.Drawable.DrawContent | null
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
export import ImageRegion = BetterGenshinImpact.GameTask.Model.Area.ImageRegion;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export {};
|
|
@@ -66,62 +66,96 @@ declare global {
|
|
|
66
66
|
moveTo(x: number, y: number, w: number, h: number): void;
|
|
67
67
|
|
|
68
68
|
/** 绘制当前区域 */
|
|
69
|
-
drawSelf(name: string
|
|
69
|
+
drawSelf(name: string): void;
|
|
70
|
+
// overload
|
|
71
|
+
drawSelf(name: string, pen: System.Drawing.Pen | null): void;
|
|
70
72
|
|
|
71
73
|
/** 绘制矩形区域 */
|
|
74
|
+
drawRect(x: number, y: number, w: number, h: number, name: string): void;
|
|
75
|
+
// overload
|
|
72
76
|
drawRect(
|
|
73
77
|
x: number,
|
|
74
78
|
y: number,
|
|
75
79
|
w: number,
|
|
76
80
|
h: number,
|
|
77
81
|
name: string,
|
|
78
|
-
pen
|
|
82
|
+
pen: System.Drawing.Pen | null
|
|
79
83
|
): void;
|
|
80
84
|
|
|
81
85
|
/** 绘制矩形区域 */
|
|
82
|
-
drawRect(rect: Rect, name: string
|
|
86
|
+
drawRect(rect: Rect, name: string): void;
|
|
87
|
+
// overload
|
|
88
|
+
drawRect(rect: Rect, name: string, pen: System.Drawing.Pen | null): void;
|
|
83
89
|
|
|
84
90
|
/** 将 [当前区域] 转换成 [遮罩窗口绘制矩形] */
|
|
91
|
+
selfToRectDrawable(name: string): BetterGenshinImpact.View.Drawable.RectDrawable;
|
|
92
|
+
// overload
|
|
85
93
|
selfToRectDrawable(
|
|
86
94
|
name: string,
|
|
87
|
-
pen
|
|
95
|
+
pen: System.Drawing.Pen | null
|
|
88
96
|
): BetterGenshinImpact.View.Drawable.RectDrawable;
|
|
89
97
|
|
|
90
98
|
/** 将 [区域] 转换成 [遮罩窗口绘制矩形] */
|
|
99
|
+
toRectDrawable(rect: Rect, name: string): BetterGenshinImpact.View.Drawable.RectDrawable;
|
|
100
|
+
// overload
|
|
91
101
|
toRectDrawable(
|
|
92
102
|
rect: Rect,
|
|
93
103
|
name: string,
|
|
94
|
-
pen
|
|
104
|
+
pen: System.Drawing.Pen | null
|
|
95
105
|
): BetterGenshinImpact.View.Drawable.RectDrawable;
|
|
96
106
|
|
|
97
107
|
/** 将 [区域] 转换成 [遮罩窗口绘制矩形] */
|
|
108
|
+
toRectDrawable(
|
|
109
|
+
x: number,
|
|
110
|
+
y: number,
|
|
111
|
+
w: number,
|
|
112
|
+
h: number,
|
|
113
|
+
name: string
|
|
114
|
+
): BetterGenshinImpact.View.Drawable.RectDrawable;
|
|
115
|
+
// overload
|
|
98
116
|
toRectDrawable(
|
|
99
117
|
x: number,
|
|
100
118
|
y: number,
|
|
101
119
|
w: number,
|
|
102
120
|
h: number,
|
|
103
121
|
name: string,
|
|
104
|
-
pen
|
|
122
|
+
pen: System.Drawing.Pen | null
|
|
105
123
|
): BetterGenshinImpact.View.Drawable.RectDrawable;
|
|
106
124
|
|
|
107
125
|
/** 将 [直线] 转换成 [遮罩窗口绘制直线] */
|
|
126
|
+
toLineDrawable(
|
|
127
|
+
x1: number,
|
|
128
|
+
y1: number,
|
|
129
|
+
x2: number,
|
|
130
|
+
y2: number,
|
|
131
|
+
name: string
|
|
132
|
+
): BetterGenshinImpact.View.Drawable.LineDrawable;
|
|
133
|
+
// overload
|
|
108
134
|
toLineDrawable(
|
|
109
135
|
x1: number,
|
|
110
136
|
y1: number,
|
|
111
137
|
x2: number,
|
|
112
138
|
y2: number,
|
|
113
139
|
name: string,
|
|
114
|
-
pen
|
|
140
|
+
pen: System.Drawing.Pen | null
|
|
115
141
|
): BetterGenshinImpact.View.Drawable.LineDrawable;
|
|
116
142
|
|
|
117
143
|
/** 绘制直线 */
|
|
144
|
+
drawLine(
|
|
145
|
+
x1: number,
|
|
146
|
+
y1: number,
|
|
147
|
+
x2: number,
|
|
148
|
+
y2: number,
|
|
149
|
+
name: string
|
|
150
|
+
): BetterGenshinImpact.View.Drawable.LineDrawable;
|
|
151
|
+
// overload
|
|
118
152
|
drawLine(
|
|
119
153
|
x1: number,
|
|
120
154
|
y1: number,
|
|
121
155
|
x2: number,
|
|
122
156
|
y2: number,
|
|
123
157
|
name: string,
|
|
124
|
-
pen
|
|
158
|
+
pen: System.Drawing.Pen | null
|
|
125
159
|
): BetterGenshinImpact.View.Drawable.LineDrawable;
|
|
126
160
|
|
|
127
161
|
/** 将当前区域的截图转换成矩形类型的区域 */
|
|
@@ -177,13 +211,22 @@ declare global {
|
|
|
177
211
|
|
|
178
212
|
constructor();
|
|
179
213
|
|
|
214
|
+
constructor(x: number, y: number, width: number, height: number);
|
|
215
|
+
// overload
|
|
216
|
+
constructor(
|
|
217
|
+
x: number,
|
|
218
|
+
y: number,
|
|
219
|
+
width: number,
|
|
220
|
+
height: number,
|
|
221
|
+
owner: BetterGenshinImpact.GameTask.Model.Area.Region | null
|
|
222
|
+
);
|
|
180
223
|
constructor(
|
|
181
224
|
x: number,
|
|
182
225
|
y: number,
|
|
183
226
|
width: number,
|
|
184
227
|
height: number,
|
|
185
|
-
owner
|
|
186
|
-
converter
|
|
228
|
+
owner: BetterGenshinImpact.GameTask.Model.Area.Region | null,
|
|
229
|
+
converter: BetterGenshinImpact.GameTask.Model.Area.Converter.INodeConverter | null
|
|
187
230
|
);
|
|
188
231
|
}
|
|
189
232
|
}
|
|
@@ -16,9 +16,11 @@ declare global {
|
|
|
16
16
|
/** 区域面积是否为空 */
|
|
17
17
|
isEmpty: boolean;
|
|
18
18
|
|
|
19
|
-
constructor(rect: Rect
|
|
20
|
-
|
|
21
|
-
constructor(rect: Rect, name
|
|
19
|
+
constructor(rect: Rect);
|
|
20
|
+
// overload
|
|
21
|
+
constructor(rect: Rect, name: string | null);
|
|
22
|
+
constructor(rect: Rect, pen: System.Drawing.Pen | null);
|
|
23
|
+
constructor(rect: Rect, pen: System.Drawing.Pen | null, name: string | null);
|
|
22
24
|
}
|
|
23
25
|
}
|
|
24
26
|
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import "../../System/Collections/Generic/IEnumerable";
|
|
2
|
+
import "../../System/TimeSpan";
|
|
3
|
+
import "./IMouseSimulator";
|
|
4
|
+
|
|
5
|
+
declare global {
|
|
6
|
+
namespace Fischless.WindowsInput {
|
|
7
|
+
interface IKeyboardSimulator {
|
|
8
|
+
mouse: Fischless.WindowsInput.IMouseSimulator;
|
|
9
|
+
|
|
10
|
+
keyDown(keyCode: string): Fischless.WindowsInput.IKeyboardSimulator;
|
|
11
|
+
|
|
12
|
+
keyDown(
|
|
13
|
+
isExtendedKey: boolean | null,
|
|
14
|
+
keyCode: string
|
|
15
|
+
): Fischless.WindowsInput.IKeyboardSimulator;
|
|
16
|
+
|
|
17
|
+
keyPress(keyCode: string): Fischless.WindowsInput.IKeyboardSimulator;
|
|
18
|
+
|
|
19
|
+
keyPress(
|
|
20
|
+
isExtendedKey: boolean | null,
|
|
21
|
+
keyCode: string
|
|
22
|
+
): Fischless.WindowsInput.IKeyboardSimulator;
|
|
23
|
+
|
|
24
|
+
keyPress(keyCodes: string[]): Fischless.WindowsInput.IKeyboardSimulator;
|
|
25
|
+
|
|
26
|
+
keyPress(
|
|
27
|
+
isExtendedKey: boolean | null,
|
|
28
|
+
keyCodes: string[]
|
|
29
|
+
): Fischless.WindowsInput.IKeyboardSimulator;
|
|
30
|
+
|
|
31
|
+
keyUp(keyCode: string): Fischless.WindowsInput.IKeyboardSimulator;
|
|
32
|
+
|
|
33
|
+
keyUp(
|
|
34
|
+
isExtendedKey: boolean | null,
|
|
35
|
+
keyCode: string
|
|
36
|
+
): Fischless.WindowsInput.IKeyboardSimulator;
|
|
37
|
+
|
|
38
|
+
modifiedKeyStroke(
|
|
39
|
+
modifierKeyCodes: System.Collections.Generic.IEnumerable<string>,
|
|
40
|
+
keyCodes: System.Collections.Generic.IEnumerable<string>
|
|
41
|
+
): Fischless.WindowsInput.IKeyboardSimulator;
|
|
42
|
+
|
|
43
|
+
modifiedKeyStroke(
|
|
44
|
+
modifierKeyCodes: System.Collections.Generic.IEnumerable<string>,
|
|
45
|
+
keyCode: string
|
|
46
|
+
): Fischless.WindowsInput.IKeyboardSimulator;
|
|
47
|
+
|
|
48
|
+
modifiedKeyStroke(
|
|
49
|
+
modifierKeyCode: string,
|
|
50
|
+
keyCodes: System.Collections.Generic.IEnumerable<string>
|
|
51
|
+
): Fischless.WindowsInput.IKeyboardSimulator;
|
|
52
|
+
|
|
53
|
+
modifiedKeyStroke(
|
|
54
|
+
modifierKeyCode: string,
|
|
55
|
+
keyCode: string
|
|
56
|
+
): Fischless.WindowsInput.IKeyboardSimulator;
|
|
57
|
+
|
|
58
|
+
textEntry(text: string): Fischless.WindowsInput.IKeyboardSimulator;
|
|
59
|
+
|
|
60
|
+
sleep(millsecondsTimeout: number): Fischless.WindowsInput.IKeyboardSimulator;
|
|
61
|
+
|
|
62
|
+
sleep(timeout: System.TimeSpan): Fischless.WindowsInput.IKeyboardSimulator;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export {};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import "../../System/TimeSpan";
|
|
2
|
+
import "./IKeyboardSimulator";
|
|
3
|
+
|
|
4
|
+
declare global {
|
|
5
|
+
namespace Fischless.WindowsInput {
|
|
6
|
+
interface IMouseSimulator {
|
|
7
|
+
keyboard: Fischless.WindowsInput.IKeyboardSimulator;
|
|
8
|
+
|
|
9
|
+
moveMouseBy(pixelDeltaX: number, pixelDeltaY: number): Fischless.WindowsInput.IMouseSimulator;
|
|
10
|
+
|
|
11
|
+
moveMouseTo(absoluteX: number, absoluteY: number): Fischless.WindowsInput.IMouseSimulator;
|
|
12
|
+
|
|
13
|
+
moveMouseToPositionOnVirtualDesktop(
|
|
14
|
+
absoluteX: number,
|
|
15
|
+
absoluteY: number
|
|
16
|
+
): Fischless.WindowsInput.IMouseSimulator;
|
|
17
|
+
|
|
18
|
+
leftButtonDown(): Fischless.WindowsInput.IMouseSimulator;
|
|
19
|
+
|
|
20
|
+
leftButtonUp(): Fischless.WindowsInput.IMouseSimulator;
|
|
21
|
+
|
|
22
|
+
leftButtonClick(): Fischless.WindowsInput.IMouseSimulator;
|
|
23
|
+
|
|
24
|
+
leftButtonDoubleClick(): Fischless.WindowsInput.IMouseSimulator;
|
|
25
|
+
|
|
26
|
+
middleButtonDown(): Fischless.WindowsInput.IMouseSimulator;
|
|
27
|
+
|
|
28
|
+
middleButtonUp(): Fischless.WindowsInput.IMouseSimulator;
|
|
29
|
+
|
|
30
|
+
middleButtonClick(): Fischless.WindowsInput.IMouseSimulator;
|
|
31
|
+
|
|
32
|
+
middleButtonDoubleClick(): Fischless.WindowsInput.IMouseSimulator;
|
|
33
|
+
|
|
34
|
+
rightButtonDown(): Fischless.WindowsInput.IMouseSimulator;
|
|
35
|
+
|
|
36
|
+
rightButtonUp(): Fischless.WindowsInput.IMouseSimulator;
|
|
37
|
+
|
|
38
|
+
rightButtonClick(): Fischless.WindowsInput.IMouseSimulator;
|
|
39
|
+
|
|
40
|
+
rightButtonDoubleClick(): Fischless.WindowsInput.IMouseSimulator;
|
|
41
|
+
|
|
42
|
+
xButtonDown(buttonId: number): Fischless.WindowsInput.IMouseSimulator;
|
|
43
|
+
|
|
44
|
+
xButtonUp(buttonId: number): Fischless.WindowsInput.IMouseSimulator;
|
|
45
|
+
|
|
46
|
+
xButtonClick(buttonId: number): Fischless.WindowsInput.IMouseSimulator;
|
|
47
|
+
|
|
48
|
+
xButtonDoubleClick(buttonId: number): Fischless.WindowsInput.IMouseSimulator;
|
|
49
|
+
|
|
50
|
+
verticalScroll(scrollAmountInClicks: number): Fischless.WindowsInput.IMouseSimulator;
|
|
51
|
+
|
|
52
|
+
horizontalScroll(scrollAmountInClicks: number): Fischless.WindowsInput.IMouseSimulator;
|
|
53
|
+
|
|
54
|
+
sleep(millsecondsTimeout: number): Fischless.WindowsInput.IMouseSimulator;
|
|
55
|
+
|
|
56
|
+
sleep(timeout: System.TimeSpan): Fischless.WindowsInput.IMouseSimulator;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export {};
|
|
@@ -25,14 +25,18 @@ declare global {
|
|
|
25
25
|
asReadOnly(): System.Collections.Generic.IReadOnlyList<T>;
|
|
26
26
|
|
|
27
27
|
/** @deprecated Not yet supported */
|
|
28
|
-
binarySearch(item: T
|
|
28
|
+
binarySearch(item: T): number;
|
|
29
|
+
// overload
|
|
30
|
+
binarySearch(item: T, comparer: ((a: T, b: T) => number) | null): number;
|
|
29
31
|
|
|
30
32
|
/** @deprecated Not yet supported */
|
|
33
|
+
binarySearch(index: number, count: number, item: T): number;
|
|
34
|
+
// overload
|
|
31
35
|
binarySearch(
|
|
32
36
|
index: number,
|
|
33
37
|
count: number,
|
|
34
38
|
item: T,
|
|
35
|
-
comparer
|
|
39
|
+
comparer: ((a: T, b: T) => number) | null
|
|
36
40
|
): number;
|
|
37
41
|
|
|
38
42
|
clear(): void;
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { Mat, Rect } from "mirada/dist/src/types/opencv";
|
|
2
|
-
import "../../../../BetterGenshinImpact/Core/Recognition/RecognitionObject";
|
|
3
|
-
import "../../../../BetterGenshinImpact/GameTask/Model/Area/Converter/INodeConverter";
|
|
4
|
-
import "../../../../BetterGenshinImpact/GameTask/Model/Area/Region";
|
|
5
|
-
import "../../../../BetterGenshinImpact/View/Drawable/DrawContent";
|
|
6
|
-
import "../../../../SixLabors/ImageSharp/Image";
|
|
7
|
-
import "../../../../System/Collections/Generic/List";
|
|
8
|
-
|
|
9
|
-
declare global {
|
|
10
|
-
namespace BetterGenshinImpact.GameTask.Model.Area {
|
|
11
|
-
class ImageRegion extends BetterGenshinImpact.GameTask.Model.Area.Region {
|
|
12
|
-
srcMat: Mat;
|
|
13
|
-
|
|
14
|
-
cacheGreyMat: Mat;
|
|
15
|
-
|
|
16
|
-
cacheImage: SixLabors.ImageSharp.Image;
|
|
17
|
-
|
|
18
|
-
deriveCrop(
|
|
19
|
-
x: number,
|
|
20
|
-
y: number,
|
|
21
|
-
w: number,
|
|
22
|
-
h: number
|
|
23
|
-
): BetterGenshinImpact.GameTask.Model.Area.ImageRegion;
|
|
24
|
-
|
|
25
|
-
deriveCrop(rect: Rect): BetterGenshinImpact.GameTask.Model.Area.ImageRegion;
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* 在本区域内查找最优识别对象
|
|
29
|
-
* @param ro 识别对象
|
|
30
|
-
* @param successAction 识别成功回调
|
|
31
|
-
* @param failAction 识别失败回调
|
|
32
|
-
*/
|
|
33
|
-
find: (
|
|
34
|
-
ro: BetterGenshinImpact.Core.Recognition.RecognitionObject,
|
|
35
|
-
successAction?: (region: BetterGenshinImpact.GameTask.Model.Area.Region) => void,
|
|
36
|
-
failAction?: () => void
|
|
37
|
-
) => BetterGenshinImpact.GameTask.Model.Area.Region;
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* 在本区域内查找识别对象,返回所有找到的结果
|
|
41
|
-
* @param ro 识别对象
|
|
42
|
-
* @param successAction 识别成功回调
|
|
43
|
-
* @param failAction 识别失败回调
|
|
44
|
-
* @returns
|
|
45
|
-
*/
|
|
46
|
-
findMulti: (
|
|
47
|
-
ro: BetterGenshinImpact.Core.Recognition.RecognitionObject,
|
|
48
|
-
successAction?: (
|
|
49
|
-
regions: System.Collections.Generic.List<BetterGenshinImpact.GameTask.Model.Area.Region>
|
|
50
|
-
) => void,
|
|
51
|
-
failAction?: () => void
|
|
52
|
-
) => System.Collections.Generic.List<BetterGenshinImpact.GameTask.Model.Area.Region>;
|
|
53
|
-
|
|
54
|
-
constructor(
|
|
55
|
-
mat: Mat,
|
|
56
|
-
x: number,
|
|
57
|
-
y: number,
|
|
58
|
-
owner?: BetterGenshinImpact.GameTask.Model.Area.Region,
|
|
59
|
-
converter?: BetterGenshinImpact.GameTask.Model.Area.Converter.INodeConverter,
|
|
60
|
-
drawContent?: BetterGenshinImpact.View.Drawable.DrawContent
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
export import ImageRegion = BetterGenshinImpact.GameTask.Model.Area.ImageRegion;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export {};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/{csharp → types}/BetterGenshinImpact/Core/Script/Dependence/Model/RealtimeTimer.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/{csharp → types}/BetterGenshinImpact/GameTask/Model/Area/Converter/INodeConverter.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|