/
ShortCut.hx
51 lines (41 loc) · 1.19 KB
/
ShortCut.hx
1
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
// Automatically generated Godot externs: DO NOT EDIT
// MIT licensed, see LICENSE.md
package godot;
import cs.system.*;
/**
A shortcut for binding input.
Shortcuts are commonly used for interacting with a `godot.Control` element from a `godot.InputEvent`.
**/
@:libType
@:csNative
@:native("Godot.ShortCut")
@:autoBuild(godot.Godot.buildUserClass())
extern class ShortCut extends godot.Resource {
/**
The shortcut's `godot.InputEvent`.
Generally the `godot.InputEvent` is a keyboard key, though it can be any `godot.InputEvent`.
**/
@:native("Shortcut")
public var shortcut:godot.InputEvent;
@:native("new")
public function new():Void;
@:native("SetShortcut")
public function setShortcut(event:godot.InputEvent):Void;
@:native("GetShortcut")
public function getShortcut():godot.InputEvent;
/**
If `true`, this shortcut is valid.
**/
@:native("IsValid")
public function isValid():Bool;
/**
Returns `true` if the shortcut's `godot.InputEvent` equals `event`.
**/
@:native("IsShortcut")
public function isShortcut(event:godot.InputEvent):Bool;
/**
Returns the shortcut's `godot.InputEvent` as a `String`.
**/
@:native("GetAsText")
public function getAsText():std.String;
}