diff options
| author | Carl Olsson | 2015-02-02 21:34:47 +1000 |
|---|---|---|
| committer | Carl Olsson | 2015-02-02 21:34:47 +1000 |
| commit | ee44664b2a14c0878f2e137dc4b6a1fbf4013eab (patch) | |
| tree | 1a1e4712f96c84a2457200a6047030b72d7981d1 /core/variant_op.cpp | |
| parent | c5bf43f6eb8aa9815362b1f771396e68c7f26f0f (diff) | |
| parent | 67d357191ff74b2cfc80015941363a97e7ee19fd (diff) | |
| download | godot-ee44664b2a14c0878f2e137dc4b6a1fbf4013eab.tar.gz godot-ee44664b2a14c0878f2e137dc4b6a1fbf4013eab.tar.zst godot-ee44664b2a14c0878f2e137dc4b6a1fbf4013eab.zip | |
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 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: { |
