Skip to content

Commit e4a407a

Browse files
committed
Autogenerate ./types
1 parent 3bb3191 commit e4a407a

File tree

5 files changed

+72
-2
lines changed

5 files changed

+72
-2
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
export {};
2+
declare global {
3+
namespace modmanager.gui {
4+
interface InputFieldCursor extends ig.GuiElementBase {
5+
colour: string;
6+
cursorTick: number;
7+
movingTimer: number;
8+
active: boolean;
9+
}
10+
interface InputFieldCursorCon extends ImpactClass<InputFieldCursor> {
11+
new (colour: string): InputFieldCursor;
12+
}
13+
let InputFieldCursor: InputFieldCursorCon;
14+
}
15+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
export {};
2+
declare global {
3+
namespace modmanager.gui {
4+
interface InputFieldType {
5+
height: number;
6+
ninepatch: ig.NinePatch;
7+
highlight: sc.ButtonGui.Highlight;
8+
}
9+
let INPUT_FIELD_TYPE: {
10+
[index: string]: InputFieldType;
11+
};
12+
}
13+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import './input-field-cursor';
2+
import './input-field-type';
3+
declare global {
4+
namespace modmanager.gui {
5+
interface InputField extends ig.FocusGui {
6+
gfx: ig.Image;
7+
value: string[];
8+
bg: sc.ButtonBgGui;
9+
focusTimer: number;
10+
alphaTimer: number;
11+
animateOnPress: boolean;
12+
noFocusOnPressed: boolean;
13+
submitSound: ig.Sound;
14+
blockedSound: ig.Sound;
15+
type: modmanager.gui.InputFieldType;
16+
boundProcessInput: (this: Window, ev: KeyboardEvent) => any;
17+
validChars: RegExp;
18+
onCharacterInput: (value: string, key: string) => any;
19+
dummyForClipping: sc.DummyContainer;
20+
highlight: sc.ButtonHighlightGui;
21+
textChild: sc.TextGui;
22+
cursorTick: number;
23+
cursorPos: number;
24+
cursor: InputFieldCursor;
25+
obscure: boolean;
26+
obscureChar: string;
27+
calculateCursorPos(this: this): number;
28+
getValueAsString(this: this): string;
29+
processInput(this: this, event: KeyboardEvent): void;
30+
setTextChildText(this: this, text: string): void;
31+
setText(this: this, text: string): void;
32+
unsetFocus(this: this): void;
33+
updateCursorPos(this: this, delta: number): void;
34+
setObscure(this: this, obscure: boolean): void;
35+
}
36+
interface InputFieldCon extends ImpactClass<InputField> {
37+
new (width: number, height: number, type?: modmanager.gui.InputFieldType, obscure?: boolean, obscureChar?: string): InputField;
38+
}
39+
let InputField: InputFieldCon;
40+
}
41+
}

types/gui/menu.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import './multipage-button-box';
55
import './changelog';
66
import './options/mod-options-menu';
77
import './manual-enforcer';
8+
import './input-field/input-field';
89
declare global {
910
namespace modmanager.gui {
1011
enum MENU_SORT_ORDER {
@@ -22,7 +23,7 @@ declare global {
2223
}
2324
interface Menu extends sc.ListInfoMenu, sc.Model {
2425
list: MenuList;
25-
inputField: nax.ccuilib.InputField;
26+
inputField: modmanager.gui.InputField;
2627
installButton: sc.ButtonGui;
2728
uninstallButton: sc.ButtonGui;
2829
testingToggleButton: sc.ButtonGui;

types/gui/options/option-elements-inject.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ declare global {
3838
declare global {
3939
namespace modmanager.gui {
4040
interface InputFieldWrapper extends ig.GuiElementBase {
41-
inputField: nax.ccuilib.InputField;
41+
inputField: modmanager.gui.InputField;
4242
isValidText?: sc.TextGui;
4343
}
4444
interface InputFieldWrapperConstructor extends ImpactClass<OptionsOptionInputField> {

0 commit comments

Comments
 (0)