diff options
| author | Anton Yabchinskiy | 2015-01-21 12:03:29 +0300 |
|---|---|---|
| committer | Anton Yabchinskiy | 2015-01-21 12:03:29 +0300 |
| commit | 6f93e6812edaf6c8c79c28dadbe5f1c4a8ced93e (patch) | |
| tree | 70e49e718d13300738c45b0de1aee5afab9ddf31 /core/variant_op.cpp | |
| parent | fa38e9b838f32baedfca7a9250a76418b1872f5d (diff) | |
| parent | c6eabbbec5a9fec7a0d473fe67a544af3454c3d2 (diff) | |
| download | godot-6f93e6812edaf6c8c79c28dadbe5f1c4a8ced93e.tar.gz godot-6f93e6812edaf6c8c79c28dadbe5f1c4a8ced93e.tar.zst godot-6f93e6812edaf6c8c79c28dadbe5f1c4a8ced93e.zip | |
Diffstat (limited to 'core/variant_op.cpp')
| -rw-r--r-- | core/variant_op.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/core/variant_op.cpp b/core/variant_op.cpp index ec43b1275..fbb5e2631 100644 --- a/core/variant_op.cpp +++ b/core/variant_op.cpp @@ -1687,6 +1687,19 @@ void Variant::set(const Variant& p_index, const Variant& p_value, bool *r_valid) return; } } + if (ie.type == InputEvent::ACTION) { + + if (str =="action") { + valid=true; + ie.action.action=p_value; + return; + } + else if (str == "pressed") { + valid=true; + ie.action.pressed=p_value; + return; + } + } } break; case DICTIONARY: { @@ -2365,6 +2378,17 @@ Variant Variant::get(const Variant& p_index, bool *r_valid) const { return Vector2(ie.screen_drag.speed_x,ie.screen_drag.speed_y); } } + if (ie.type == InputEvent::ACTION) { + + if (str =="action") { + valid=true; + return ie.action.action; + } + else if (str == "pressed") { + valid=true; + ie.action.pressed; + } + } } break; case DICTIONARY: { |
