diff options
author | Yuri Sizov <yuris@humnom.net> | 2022-08-12 23:57:11 +0300 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2022-08-22 18:35:11 +0300 |
commit | 1a24c9e14bf1f9578eda338344c12faf66fb0e65 (patch) | |
tree | ada6f4deefe627b4a77133ef3c074e35d6f2a738 /core/input | |
parent | fdc36ad08290a8453d26fce3d8b7b13bd8cd5a1a (diff) |
Make `_validate_property` a multilevel method
Diffstat (limited to 'core/input')
-rw-r--r-- | core/input/input_event.cpp | 14 | ||||
-rw-r--r-- | core/input/input_event.h | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/core/input/input_event.cpp b/core/input/input_event.cpp index 8ad2193fca..3f02d80c26 100644 --- a/core/input/input_event.cpp +++ b/core/input/input_event.cpp @@ -274,24 +274,24 @@ void InputEventWithModifiers::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "command_pressed"), "set_command_pressed", "is_command_pressed"); } -void InputEventWithModifiers::_validate_property(PropertyInfo &property) const { +void InputEventWithModifiers::_validate_property(PropertyInfo &p_property) const { if (store_command) { // If we only want to Store "Command". #ifdef APPLE_STYLE_KEYS // Don't store "Meta" on Mac. - if (property.name == "meta_pressed") { - property.usage ^= PROPERTY_USAGE_STORAGE; + if (p_property.name == "meta_pressed") { + p_property.usage ^= PROPERTY_USAGE_STORAGE; } #else // Don't store "Ctrl". - if (property.name == "ctrl_pressed") { - property.usage ^= PROPERTY_USAGE_STORAGE; + if (p_property.name == "ctrl_pressed") { + p_property.usage ^= PROPERTY_USAGE_STORAGE; } #endif } else { // We don't want to store command, only ctrl or meta (on mac). - if (property.name == "command_pressed") { - property.usage ^= PROPERTY_USAGE_STORAGE; + if (p_property.name == "command_pressed") { + p_property.usage ^= PROPERTY_USAGE_STORAGE; } } } diff --git a/core/input/input_event.h b/core/input/input_event.h index 59a2df497c..6cfc031c8a 100644 --- a/core/input/input_event.h +++ b/core/input/input_event.h @@ -128,7 +128,7 @@ class InputEventWithModifiers : public InputEventFromWindow { protected: static void _bind_methods(); - virtual void _validate_property(PropertyInfo &property) const override; + void _validate_property(PropertyInfo &p_property) const; public: void set_store_command(bool p_enabled); |