1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

Added EditorCommandPalette

This commit is contained in:
Bhuvan Vemula
2021-05-29 18:58:16 +05:30
parent 504eb48214
commit a0a019a998
15 changed files with 576 additions and 59 deletions

View File

@@ -32,6 +32,7 @@
#include "core/input/input_map.h"
#include "core/os/keyboard.h"
#include "scene/gui/shortcut.h"
const int InputEvent::DEVICE_ID_TOUCH_MOUSE = -1;
const int InputEvent::DEVICE_ID_INTERNAL = -2;
@@ -1512,3 +1513,26 @@ void InputEventMIDI::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "controller_number"), "set_controller_number", "get_controller_number");
ADD_PROPERTY(PropertyInfo(Variant::INT, "controller_value"), "set_controller_value", "get_controller_value");
}
///////////////////////////////////
void InputEventShortcut::set_shortcut(Ref<Shortcut> p_shortcut) {
shortcut = p_shortcut;
emit_changed();
}
Ref<Shortcut> InputEventShortcut::get_shortcut() {
return shortcut;
}
bool InputEventShortcut::is_pressed() const {
return true;
}
String InputEventShortcut::as_text() const {
return vformat(RTR("Input Event with Shortcut=%s"), shortcut->get_as_text());
}
String InputEventShortcut::to_string() {
return vformat("InputEventShortcut: shortcut=%s", shortcut->get_as_text());
}