mirror of
https://github.com/godotengine/godot.git
synced 2025-11-03 07:01:06 +00:00
validate 'shortcut' in InputEventShortcut
This commit is contained in:
parent
9013771b53
commit
eae7f1c1ae
1 changed files with 4 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue