diff options
author | Anton Yabchinskiy <arn@bestmx.ru> | 2015-01-21 12:03:29 +0300 |
---|---|---|
committer | Anton Yabchinskiy <arn@bestmx.ru> | 2015-01-21 12:03:29 +0300 |
commit | 6f93e6812edaf6c8c79c28dadbe5f1c4a8ced93e (patch) | |
tree | 70e49e718d13300738c45b0de1aee5afab9ddf31 /core/variant_op.cpp | |
parent | fa38e9b838f32baedfca7a9250a76418b1872f5d (diff) | |
parent | c6eabbbec5a9fec7a0d473fe67a544af3454c3d2 (diff) | |
download | redot-engine-6f93e6812edaf6c8c79c28dadbe5f1c4a8ced93e.tar.gz |
Merge branch 'master' of https://github.com/okamstudio/godot
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 ec43b1275c..fbb5e2631d 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: { |