summaryrefslogtreecommitdiffstats
path: root/core/variant_op.cpp
diff options
context:
space:
mode:
authorBil Bas (Spooner) <bil.bagpuss@gmail.com>2015-02-01 20:29:11 +0000
committerBil Bas (Spooner) <bil.bagpuss@gmail.com>2015-02-01 20:29:11 +0000
commit2c1a3dfed6f9a474ace9123b46edca77be548d3e (patch)
treee1cd0db9257a5a241a1db3906041dbb9c1295c74 /core/variant_op.cpp
parentaf7c8bdf236b7c572bc33a44e3bb64fecdaa99d9 (diff)
parent67d357191ff74b2cfc80015941363a97e7ee19fd (diff)
downloadredot-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.cpp24
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: {