summaryrefslogtreecommitdiffstats
path: root/core/input_map.h
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-09-01 18:58:52 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-09-01 18:59:46 -0300
commit5b96c3a5527c1b2989dbfbe625f1c763b8887334 (patch)
tree6fbd6ed3703a3f8514e0e45eb590aeac7bc1284d /core/input_map.h
parent3759d378da7ceab382b31b86d69bb90b9eeaba90 (diff)
downloadredot-engine-5b96c3a5527c1b2989dbfbe625f1c763b8887334.tar.gz
-Modified Input and added is_action_just_pressed() as well as is_action_just_released()
Diffstat (limited to 'core/input_map.h')
-rw-r--r--core/input_map.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/core/input_map.h b/core/input_map.h
index dc5a911963..a224765d8c 100644
--- a/core/input_map.h
+++ b/core/input_map.h
@@ -35,12 +35,14 @@
class InputMap : public Object {
OBJ_TYPE( InputMap, Object );
- static InputMap *singleton;
-
+public:
struct Action {
int id;
List<InputEvent> inputs;
};
+private:
+ static InputMap *singleton;
+
mutable Map<StringName, Action> input_map;
mutable Map<int,StringName> input_id_map;
@@ -72,7 +74,7 @@ public:
bool event_is_action(const InputEvent& p_event, const StringName& p_action) const;
bool event_is_joy_motion_action_pressed(const InputEvent& p_event) const;
-
+ const Map<StringName, Action>& get_action_map() const;
void load_from_globals();
void load_default();