diff options
author | Bil Bas (Spooner) <bil.bagpuss@gmail.com> | 2015-02-01 20:29:11 +0000 |
---|---|---|
committer | Bil Bas (Spooner) <bil.bagpuss@gmail.com> | 2015-02-01 20:29:11 +0000 |
commit | 2c1a3dfed6f9a474ace9123b46edca77be548d3e (patch) | |
tree | e1cd0db9257a5a241a1db3906041dbb9c1295c74 /core/variant_op.cpp | |
parent | af7c8bdf236b7c572bc33a44e3bb64fecdaa99d9 (diff) | |
parent | 67d357191ff74b2cfc80015941363a97e7ee19fd (diff) | |
download | redot-engine-2c1a3dfed6f9a474ace9123b46edca77be548d3e.tar.gz |
Merge branch 'master' of https://github.com/okamstudio/godot into add_sprintf
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 533a9d6952..21bbc8c7ee 100644 --- a/core/variant_op.cpp +++ b/core/variant_op.cpp @@ -1701,6 +1701,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: { @@ -2379,6 +2392,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: { |