mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Rework FileDialog shortcuts
This commit is contained in:
@@ -85,6 +85,17 @@ String Shortcut::get_as_text() const {
|
||||
return "None";
|
||||
}
|
||||
|
||||
Ref<Shortcut> Shortcut::make_from_action(const StringName &p_action) {
|
||||
Ref<InputEventAction> event;
|
||||
event.instantiate();
|
||||
event->set_action(p_action);
|
||||
|
||||
Ref<Shortcut> shortcut;
|
||||
shortcut.instantiate();
|
||||
shortcut->set_events({ event });
|
||||
return shortcut;
|
||||
}
|
||||
|
||||
bool Shortcut::has_valid_event() const {
|
||||
// Tests if there is ANY input event which is valid.
|
||||
for (int i = 0; i < events.size(); i++) {
|
||||
|
||||
Reference in New Issue
Block a user