mirror of
https://github.com/godotengine/godot.git
synced 2024-11-27 09:16:35 +08:00
Merge pull request #53058 from LATRio/52191
check if 'shortcut' in InputEventShortcut is valid
This commit is contained in:
commit
79e33f8b71
@ -1557,9 +1557,13 @@ bool InputEventShortcut::is_pressed() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String InputEventShortcut::as_text() const {
|
String InputEventShortcut::as_text() const {
|
||||||
|
ERR_FAIL_COND_V(shortcut.is_null(), "None");
|
||||||
|
|
||||||
return vformat(RTR("Input Event with Shortcut=%s"), shortcut->get_as_text());
|
return vformat(RTR("Input Event with Shortcut=%s"), shortcut->get_as_text());
|
||||||
}
|
}
|
||||||
|
|
||||||
String InputEventShortcut::to_string() {
|
String InputEventShortcut::to_string() {
|
||||||
|
ERR_FAIL_COND_V(shortcut.is_null(), "None");
|
||||||
|
|
||||||
return vformat("InputEventShortcut: shortcut=%s", shortcut->get_as_text());
|
return vformat("InputEventShortcut: shortcut=%s", shortcut->get_as_text());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user