blockbench-types 5.1.0 → 5.2.0-beta.0-next.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/README.md +30 -30
- package/custom/animation.d.ts +257 -256
- package/custom/animation_controller.d.ts +124 -124
- package/custom/blockbench.d.ts +73 -73
- package/custom/canvas.d.ts +324 -307
- package/custom/codec.d.ts +182 -182
- package/custom/copy_paste.d.ts +43 -42
- package/custom/cube.d.ts +151 -151
- package/custom/desktop.d.ts +61 -73
- package/custom/display_mode.d.ts +141 -137
- package/custom/edit_session.d.ts +38 -37
- package/custom/global.d.ts +181 -168
- package/custom/group.d.ts +113 -113
- package/custom/interface.d.ts +88 -78
- package/custom/io.d.ts +12 -12
- package/custom/{toolbars.d.ts → keybind.d.ts} +150 -221
- package/custom/keyframe.d.ts +94 -94
- package/custom/libs.d.ts +13 -13
- package/custom/menu_bar.d.ts +66 -0
- package/custom/mesh.d.ts +196 -196
- package/custom/misc.d.ts +196 -199
- package/custom/molang.d.ts +159 -159
- package/custom/outliner.d.ts +158 -158
- package/custom/painter.d.ts +102 -69
- package/custom/preview_scene.d.ts +120 -120
- package/custom/screencam.d.ts +71 -71
- package/custom/spline_mesh.d.ts +190 -189
- package/custom/texture_group.d.ts +68 -68
- package/custom/textures.d.ts +526 -515
- package/custom/timeline.d.ts +66 -66
- package/custom/undo.d.ts +209 -208
- package/custom/util/version_util.d.ts +32 -32
- package/custom/util.d.ts +235 -235
- package/custom/uveditor.d.ts +3 -3
- package/custom/validator.d.ts +99 -99
- package/documentation.md +12 -12
- package/generated/animations/mirror_animating.d.ts +7 -0
- package/generated/animations/timeline_animators.d.ts +1 -1
- package/generated/api.d.ts +8 -1
- package/generated/file_system.d.ts +2 -1
- package/generated/find_replace.d.ts +6 -0
- package/generated/formats/standards/obj.d.ts +9 -11
- package/generated/interface/actions.d.ts +16 -12
- package/generated/interface/form.d.ts +2 -1
- package/generated/interface/main_tools.d.ts +23 -0
- package/generated/interface/menu.d.ts +141 -0
- package/generated/interface/menu_bar.d.ts +2 -3
- package/generated/interface/resize_lines.d.ts +2 -0
- package/generated/interface/settings.d.ts +6 -2
- package/generated/interface/shared_actions.d.ts +5 -0
- package/generated/interface/start_screen.d.ts +62 -42
- package/generated/interface/toolbars.d.ts +146 -46
- package/generated/io/format.d.ts +1 -0
- package/generated/io/project.d.ts +10 -2
- package/generated/lib/CanvasFrame.d.ts +1 -0
- package/generated/main.d.ts +4 -1
- package/generated/modeling/mesh/add_mesh.d.ts +6 -0
- package/generated/modeling/mesh/proportional_edit.d.ts +15 -13
- package/generated/modeling/mesh/util.d.ts +8 -2
- package/generated/modeling/mirror_modeling.d.ts +4 -0
- package/generated/modeling/weight_paint.d.ts +11 -0
- package/generated/modes.d.ts +2 -2
- package/generated/native_apis.d.ts +3 -0
- package/generated/outliner/abstract/outliner_element.d.ts +1 -0
- package/generated/outliner/abstract/outliner_node.d.ts +1 -0
- package/generated/outliner/types/armature.d.ts +1 -1
- package/generated/outliner/types/armature_bone.d.ts +1 -1
- package/generated/outliner/types/billboard.d.ts +1 -1
- package/generated/outliner/types/bounding_box.d.ts +1 -1
- package/generated/outliner/types/cube.d.ts +1 -1
- package/generated/outliner/types/group.d.ts +1 -1
- package/generated/outliner/types/locator.d.ts +1 -1
- package/generated/outliner/types/mesh.d.ts +1 -1
- package/generated/outliner/types/null_object.d.ts +1 -1
- package/generated/outliner/types/spline_mesh.d.ts +1 -2
- package/generated/outliner/types/texture_mesh.d.ts +1 -1
- package/generated/plugin_loader.d.ts +1 -1
- package/generated/preview/preview.d.ts +280 -0
- package/generated/preview/reference_images.d.ts +1 -1
- package/generated/texturing/layers.d.ts +140 -0
- package/generated/util/gif.d.ts +12 -3
- package/generated/util/state_memory.d.ts +3 -11
- package/index.d.ts +2 -2
- package/package.json +39 -39
- package/tsconfig.json +19 -19
- package/type_config.json +43 -46
- package/custom/menu.d.ts +0 -136
- package/custom/preview.d.ts +0 -137
- package/custom/start_screen.d.ts +0 -15
- package/custom/texture_layers.d.ts +0 -117
- package/generated/global_types.d.ts +0 -47
- package/generated/io/formats/bedrock.d.ts +0 -4
- package/generated/io/formats/bedrock_old.d.ts +0 -4
- package/generated/io/formats/collada.d.ts +0 -4
- package/generated/io/formats/fbx.d.ts +0 -17
- package/generated/io/formats/gltf.d.ts +0 -6
- package/generated/io/formats/java_block.d.ts +0 -4
- package/generated/io/formats/modded_entity.d.ts +0 -139
- package/generated/io/formats/obj.d.ts +0 -12
- package/generated/io/formats/optifine_jem.d.ts +0 -3
- package/generated/io/formats/optifine_jpm.d.ts +0 -3
- package/generated/io/formats/skin.d.ts +0 -22
package/custom/interface.d.ts
CHANGED
|
@@ -1,78 +1,88 @@
|
|
|
1
|
-
/// <reference types="./blockbench"/>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
1
|
+
/// <reference types="./blockbench"/>
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Update the size of everything in the UI after the window has been resized or other UI size changes have happeped
|
|
5
|
+
* @param event
|
|
6
|
+
*/
|
|
7
|
+
declare function resizeWindow(event?: Event): void
|
|
8
|
+
|
|
9
|
+
declare namespace Interface {
|
|
10
|
+
function createElement(
|
|
11
|
+
type: keyof HTMLElementTagNameMap,
|
|
12
|
+
attributes?: {},
|
|
13
|
+
content?: string | HTMLElement | HTMLElement[]
|
|
14
|
+
): HTMLElement
|
|
15
|
+
|
|
16
|
+
const data: {
|
|
17
|
+
left_bar_width: number
|
|
18
|
+
right_bar_width: number
|
|
19
|
+
quad_view_x: number
|
|
20
|
+
quad_view_y: number
|
|
21
|
+
timeline_head: number
|
|
22
|
+
start_screen_width: number
|
|
23
|
+
left_bar: string[]
|
|
24
|
+
right_bar: string[]
|
|
25
|
+
}
|
|
26
|
+
let left_bar_width: number
|
|
27
|
+
let right_bar_width: number
|
|
28
|
+
let top_panel_height: number
|
|
29
|
+
let bottom_panel_height: number
|
|
30
|
+
let default_data: any
|
|
31
|
+
function getTopPanel(): Panel
|
|
32
|
+
function getBottomPanel(): Panel
|
|
33
|
+
function getLeftPanels(in_order: boolean = true): Panel[]
|
|
34
|
+
function getRightPanels(in_order: boolean = true): Panel[]
|
|
35
|
+
function getModeData(): any
|
|
36
|
+
const Resizers: {
|
|
37
|
+
left: ResizeLine
|
|
38
|
+
right: ResizeLine
|
|
39
|
+
quad_view_x: ResizeLine
|
|
40
|
+
quad_view_y: ResizeLine
|
|
41
|
+
top: ResizeLine
|
|
42
|
+
bottom: ResizeLine
|
|
43
|
+
timeline_head: ResizeLine
|
|
44
|
+
start_screen_width: ResizeLine
|
|
45
|
+
[id: string]: ResizeLine
|
|
46
|
+
}
|
|
47
|
+
const status_bar: {
|
|
48
|
+
menu: Menu
|
|
49
|
+
vue: Vue.Component
|
|
50
|
+
}
|
|
51
|
+
let tab_bar: Vue
|
|
52
|
+
const Panels: {
|
|
53
|
+
[key: string]: Panel
|
|
54
|
+
}
|
|
55
|
+
function toggleSidebar(side: any, status: any): void
|
|
56
|
+
|
|
57
|
+
const text_edit_menu: Menu
|
|
58
|
+
|
|
59
|
+
function addSuggestedModifierKey(key: 'ctrl' | 'shift' | 'alt', text: string): void
|
|
60
|
+
function removeSuggestedModifierKey(key: 'ctrl' | 'shift' | 'alt', text: string): void
|
|
61
|
+
|
|
62
|
+
function definePanels(callback: () => void): void
|
|
63
|
+
|
|
64
|
+
const center_screen: HTMLElement
|
|
65
|
+
const page_wrapper: HTMLElement
|
|
66
|
+
const preview: HTMLElement
|
|
67
|
+
const work_screen: HTMLElement
|
|
68
|
+
const right_bar: HTMLElement
|
|
69
|
+
const left_bar: HTMLElement
|
|
70
|
+
|
|
71
|
+
namespace CustomElements {
|
|
72
|
+
class SelectInput<T extends Record<string, string>> {
|
|
73
|
+
node: HTMLElement
|
|
74
|
+
constructor(
|
|
75
|
+
id: string,
|
|
76
|
+
options: {
|
|
77
|
+
value?: T[keyof T]
|
|
78
|
+
default?: T[keyof T]
|
|
79
|
+
options: T
|
|
80
|
+
onChange?(value: T[keyof T]): void
|
|
81
|
+
}
|
|
82
|
+
)
|
|
83
|
+
set(value: T[keyof T]): void
|
|
84
|
+
}
|
|
85
|
+
const ResizeLine: any
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
declare function updateInterface(): void
|
package/custom/io.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
function setupDragHandlers(): void;
|
|
3
|
-
function loadModelFile(file: any, args
|
|
4
|
-
function loadImages(files: any, event
|
|
5
|
-
function unsupportedFileFormatMessage(file_name: string): void;
|
|
6
|
-
namespace Extruder {
|
|
7
|
-
function drawImage(file: any): void;
|
|
8
|
-
function startConversion(formResult: any): void;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export {};
|
|
1
|
+
declare global {
|
|
2
|
+
function setupDragHandlers(): void;
|
|
3
|
+
function loadModelFile(file: any, args?: any): void;
|
|
4
|
+
function loadImages(files: any, event?: Event): Promise<void>;
|
|
5
|
+
function unsupportedFileFormatMessage(file_name: string): void;
|
|
6
|
+
namespace Extruder {
|
|
7
|
+
function drawImage(file: any): void;
|
|
8
|
+
function startConversion(formResult: any): void;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export {};
|
|
@@ -1,221 +1,150 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
*/
|
|
4
|
-
/// <reference types="./blockbench"/>
|
|
5
|
-
|
|
6
|
-
declare global {
|
|
7
|
-
export interface KeybindKeys {
|
|
8
|
-
/**
|
|
9
|
-
* Main key, can be a numeric keycode or a lower case character
|
|
10
|
-
*/
|
|
11
|
-
key
|
|
12
|
-
ctrl?: boolean
|
|
13
|
-
shift?: boolean
|
|
14
|
-
alt?: boolean
|
|
15
|
-
meta?: boolean
|
|
16
|
-
}
|
|
17
|
-
type VariationModifier =
|
|
18
|
-
| 'always'
|
|
19
|
-
| 'ctrl'
|
|
20
|
-
| 'shift'
|
|
21
|
-
| 'alt'
|
|
22
|
-
| 'meta'
|
|
23
|
-
| 'unless_ctrl'
|
|
24
|
-
| 'unless_shift'
|
|
25
|
-
| 'unless_alt'
|
|
26
|
-
type ModifierKey = 'ctrl' | 'shift' | 'alt' | 'meta'
|
|
27
|
-
/**
|
|
28
|
-
* A customizable keybind
|
|
29
|
-
*/
|
|
30
|
-
class Keybind {
|
|
31
|
-
/**
|
|
32
|
-
* Create a keybind
|
|
33
|
-
* @param {object} keys Set up the default keys that need to be pressed
|
|
34
|
-
* @param {number|string} keys.key Main key. Check keycode.info to find out the numeric value, or simply use letters for letter keys
|
|
35
|
-
* @param {boolean} keys.ctrl Control key. On MacOS this automatically works for Cmd
|
|
36
|
-
* @param {boolean} keys.shift Shift key
|
|
37
|
-
* @param {boolean} keys.alt Alt key
|
|
38
|
-
* @param {boolean} keys.meta Meta key
|
|
39
|
-
*/
|
|
40
|
-
constructor(keys?: KeybindKeys | null, variations?: Record<string, VariationModifier>)
|
|
41
|
-
key: number
|
|
42
|
-
ctrl?: boolean
|
|
43
|
-
shift?: boolean
|
|
44
|
-
alt?: boolean
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
*
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
*
|
|
62
|
-
* @param
|
|
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
|
-
* @param
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
*
|
|
109
|
-
* @param
|
|
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
|
-
children: (BarItem | string)[]
|
|
152
|
-
no_wrap: boolean
|
|
153
|
-
narrow: boolean
|
|
154
|
-
vertical: boolean
|
|
155
|
-
default_children: (BarItem | string)[]
|
|
156
|
-
/*private*/ positionLookup: any
|
|
157
|
-
/*private*/ condition_cache: any
|
|
158
|
-
/*private*/ previously_enabled: any
|
|
159
|
-
/*private*/ postload: any
|
|
160
|
-
/*private*/ menu: any
|
|
161
|
-
node: HTMLElement
|
|
162
|
-
constructor(id: string, data: ToolbarOptions)
|
|
163
|
-
constructor(data: ToolbarOptions)
|
|
164
|
-
build(data: any, force: any): this
|
|
165
|
-
contextmenu(event: Event): void
|
|
166
|
-
editMenu(): this
|
|
167
|
-
add(action: any, position?: number): this
|
|
168
|
-
remove(action: BarItem, update: boolean = false): this
|
|
169
|
-
update(): this
|
|
170
|
-
toPlace(place: any): this
|
|
171
|
-
save(): this
|
|
172
|
-
reset(): this
|
|
173
|
-
condition(): boolean
|
|
174
|
-
}
|
|
175
|
-
export namespace BARS {
|
|
176
|
-
const stored: {}
|
|
177
|
-
const editing_bar: undefined | Toolbar
|
|
178
|
-
const action_definers: (() => void)[]
|
|
179
|
-
const condition: any
|
|
180
|
-
function defineActions(definer: any): void
|
|
181
|
-
function setupActions(): void
|
|
182
|
-
function setupToolbars(): void
|
|
183
|
-
function setupVue(): void
|
|
184
|
-
function updateConditions(): void
|
|
185
|
-
function updateToolToolbar(): void
|
|
186
|
-
}
|
|
187
|
-
/**
|
|
188
|
-
* A dialog-based interface to search and trigger actions and other things
|
|
189
|
-
*/
|
|
190
|
-
namespace ActionControl {
|
|
191
|
-
const open: boolean
|
|
192
|
-
const type: string
|
|
193
|
-
const max_length: number
|
|
194
|
-
function select(input?: string): void
|
|
195
|
-
function show(input?: string): void
|
|
196
|
-
function hide(): void
|
|
197
|
-
function confirm(event: Event): void
|
|
198
|
-
function cancel(): void
|
|
199
|
-
function trigger(action: any, event: Event): void
|
|
200
|
-
function click(action: any, event: Event): void
|
|
201
|
-
function handleKeys(event: Event): boolean
|
|
202
|
-
}
|
|
203
|
-
/**
|
|
204
|
-
* Stores and handles keybinds
|
|
205
|
-
*/
|
|
206
|
-
namespace Keybinds {
|
|
207
|
-
const actions: BarItem[]
|
|
208
|
-
const stored: Record<string, { key: number; ctrl: boolean; shift: boolean }>
|
|
209
|
-
const extra: Record<string, KeybindItem>
|
|
210
|
-
const structure: any
|
|
211
|
-
function save(): void
|
|
212
|
-
function reset(): void
|
|
213
|
-
}
|
|
214
|
-
class _ToolToolbar extends Toolbar {
|
|
215
|
-
selected: Tool
|
|
216
|
-
original: any
|
|
217
|
-
}
|
|
218
|
-
const Toolbox: _ToolToolbar
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
export {}
|
|
1
|
+
/**
|
|
2
|
+
* Keybindings and action control
|
|
3
|
+
*/
|
|
4
|
+
/// <reference types="./blockbench"/>
|
|
5
|
+
|
|
6
|
+
declare global {
|
|
7
|
+
export interface KeybindKeys {
|
|
8
|
+
/**
|
|
9
|
+
* Main key, can be a numeric keycode or a lower case character
|
|
10
|
+
*/
|
|
11
|
+
key?: number | string
|
|
12
|
+
ctrl?: boolean
|
|
13
|
+
shift?: boolean
|
|
14
|
+
alt?: boolean
|
|
15
|
+
meta?: boolean
|
|
16
|
+
}
|
|
17
|
+
type VariationModifier =
|
|
18
|
+
| 'always'
|
|
19
|
+
| 'ctrl'
|
|
20
|
+
| 'shift'
|
|
21
|
+
| 'alt'
|
|
22
|
+
| 'meta'
|
|
23
|
+
| 'unless_ctrl'
|
|
24
|
+
| 'unless_shift'
|
|
25
|
+
| 'unless_alt'
|
|
26
|
+
type ModifierKey = 'ctrl' | 'shift' | 'alt' | 'meta'
|
|
27
|
+
/**
|
|
28
|
+
* A customizable keybind
|
|
29
|
+
*/
|
|
30
|
+
class Keybind {
|
|
31
|
+
/**
|
|
32
|
+
* Create a keybind
|
|
33
|
+
* @param {object} keys Set up the default keys that need to be pressed
|
|
34
|
+
* @param {number|string} keys.key Main key. Check keycode.info to find out the numeric value, or simply use letters for letter keys
|
|
35
|
+
* @param {boolean} keys.ctrl Control key. On MacOS this automatically works for Cmd
|
|
36
|
+
* @param {boolean} keys.shift Shift key
|
|
37
|
+
* @param {boolean} keys.alt Alt key
|
|
38
|
+
* @param {boolean} keys.meta Meta key
|
|
39
|
+
*/
|
|
40
|
+
constructor(keys?: KeybindKeys | null, variations?: Record<string, VariationModifier>)
|
|
41
|
+
key: number
|
|
42
|
+
ctrl?: boolean
|
|
43
|
+
shift?: boolean
|
|
44
|
+
alt?: boolean
|
|
45
|
+
meta?: boolean
|
|
46
|
+
variations?: {
|
|
47
|
+
[key: string]: ModifierKey
|
|
48
|
+
}
|
|
49
|
+
label: string
|
|
50
|
+
set(keys: KeybindKeys, default_keybind?: Keybind): this
|
|
51
|
+
/**
|
|
52
|
+
* Unassign the assigned key
|
|
53
|
+
*/
|
|
54
|
+
clear(): this
|
|
55
|
+
/**
|
|
56
|
+
* Save any changes to local storage
|
|
57
|
+
* @param save Save all keybinding changes to local storage. Set to fales if updating multiple at once
|
|
58
|
+
*/
|
|
59
|
+
save(save?: false): this
|
|
60
|
+
/**
|
|
61
|
+
* Assign an action to the keybind
|
|
62
|
+
* @param id ID of the action
|
|
63
|
+
* @param sub_id sub keybind ID
|
|
64
|
+
*/
|
|
65
|
+
setAction(id: string, sub_id?: string): this | undefined
|
|
66
|
+
/**
|
|
67
|
+
* Get display text showing the keybind
|
|
68
|
+
* @param formatted If true, the return string will include HTML formatting
|
|
69
|
+
*/
|
|
70
|
+
getText(formatted?: boolean): string
|
|
71
|
+
/**
|
|
72
|
+
* Get the name of the bound key
|
|
73
|
+
*/
|
|
74
|
+
getCode(key?: string): string
|
|
75
|
+
/**
|
|
76
|
+
* Check if a key is assigned
|
|
77
|
+
*/
|
|
78
|
+
hasKey(): boolean
|
|
79
|
+
/**
|
|
80
|
+
* Test if the keybind would be triggered by the event
|
|
81
|
+
*/
|
|
82
|
+
isTriggered(event: Event): boolean
|
|
83
|
+
/**
|
|
84
|
+
* Test which variation would be triggered by the event. Returns the ID of the variation if triggered
|
|
85
|
+
* @param event The event to test
|
|
86
|
+
*/
|
|
87
|
+
additionalModifierTriggered(event: Event): string | undefined
|
|
88
|
+
/**
|
|
89
|
+
* Test if a variation would be triggered by the event
|
|
90
|
+
* @param event The event to test
|
|
91
|
+
* @param variation The variation to test againts
|
|
92
|
+
*/
|
|
93
|
+
additionalModifierTriggered(event: Event, variation: string): boolean
|
|
94
|
+
/**
|
|
95
|
+
* Open a UI to let the user record a new key combination
|
|
96
|
+
*/
|
|
97
|
+
record(): this
|
|
98
|
+
/**
|
|
99
|
+
* Stop recording a new key combination
|
|
100
|
+
*/
|
|
101
|
+
stopRecording(): this
|
|
102
|
+
/**
|
|
103
|
+
* Returns the label of the keybinding
|
|
104
|
+
*/
|
|
105
|
+
toString(): string
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Load an included keymap by ID
|
|
109
|
+
* @param id
|
|
110
|
+
* @param from_start_screen
|
|
111
|
+
*/
|
|
112
|
+
static loadKeymap(id: string, from_start_screen?: boolean): void | true
|
|
113
|
+
/**
|
|
114
|
+
* Check if two KeybindItems are mutually exclusive, so only one can be available at the time. This is only the case if they each have a ConditionResolvable that is structured to support this
|
|
115
|
+
*/
|
|
116
|
+
static no_overlap(k1: KeybindItem, k2: KeybindItem): boolean
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* A dialog-based interface to search and trigger actions and other things
|
|
121
|
+
*/
|
|
122
|
+
namespace ActionControl {
|
|
123
|
+
const open: boolean
|
|
124
|
+
const type: string
|
|
125
|
+
const max_length: number
|
|
126
|
+
function select(input?: string): void
|
|
127
|
+
function show(input?: string): void
|
|
128
|
+
function hide(): void
|
|
129
|
+
function confirm(event: Event): void
|
|
130
|
+
function cancel(): void
|
|
131
|
+
function trigger(action: any, event: Event): void
|
|
132
|
+
function click(action: any, event: Event): void
|
|
133
|
+
function handleKeys(event: Event): boolean
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Stores and handles keybinds
|
|
137
|
+
*/
|
|
138
|
+
namespace Keybinds {
|
|
139
|
+
const actions: BarItem[]
|
|
140
|
+
const stored: Record<string, { key: number; ctrl: boolean; shift: boolean }>
|
|
141
|
+
const extra: Record<string, KeybindItem>
|
|
142
|
+
const structure: any
|
|
143
|
+
function save(): void
|
|
144
|
+
function reset(): void
|
|
145
|
+
function loadKeymap(id: string, from_start_screen: boolean = false): true | void
|
|
146
|
+
}
|
|
147
|
+
const Vertexsnap: any
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export {}
|