validate 'shortcut' in InputEventShortcut

This commit is contained in:
LATRio 2021-09-25 23:44:42 +09:00
parent 9013771b53
commit eae7f1c1ae

View File

@ -1557,9 +1557,13 @@ bool InputEventShortcut::is_pressed() 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());
}
String InputEventShortcut::to_string() {
ERR_FAIL_COND_V(shortcut.is_null(), "None");
return vformat("InputEventShortcut: shortcut=%s", shortcut->get_as_text());
}