Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 699 vs 703 for /trunk/Source Code/Scenes/Headers/SceneInputActions.h

Diff revisions: vs.
  @@ -36,6 +36,35 @@
36 36
37 37 namespace Divide {
38 38
39 + struct InputParams {
40 + InputParams()
41 + : InputParams(-1)
42 + {
43 + }
44 +
45 + InputParams(I32 var1)
46 + : InputParams(var1, -1)
47 + {
48 + }
49 +
50 + InputParams(I32 var1, I32 var2)
51 + : InputParams(var1, var2, -1)
52 + {
53 + }
54 +
55 + InputParams(I32 var1, I32 var2, I32 var3)
56 + : InputParams(var1, var2, var3, -1)
57 + {
58 + }
59 +
60 + InputParams(I32 var1, I32 var2, I32 var3, I32 var4)
61 + : _var{ var1, var2, var3, var4 }
62 + {
63 + }
64 +
65 + I32 _var[4];
66 + };
67 +
39 68 struct PressReleaseActions {
40 69 PressReleaseActions();
41 70 PressReleaseActions(U16 onPressAction,
  @@ -79,15 +108,28 @@
79 108 }
80 109 };
81 110
111 + struct InputAction {
112 + InputAction();
113 + InputAction(DELEGATE_CBK_PARAM<InputParams>& action);
114 +
115 + DELEGATE_CBK_PARAM<InputParams> _action;
116 + // This will be usefull for menus and the like (defined in XML)
117 + stringImpl _displayName;
118 +
119 + void displayName(const stringImpl& name);
120 + };
121 +
82 122 class InputActionList {
83 123 public:
84 124 InputActionList();
85 125
86 - bool registerInputAction(U16 id, DELEGATE_CBK<> action);
87 - DELEGATE_CBK<> getInputAction(U16 id) const;
126 + bool registerInputAction(U16 id, DELEGATE_CBK_PARAM<InputParams> action);
127 + InputAction& getInputAction(U16 id);
128 + const InputAction& getInputAction(U16 id) const;
88 129
89 130 protected:
90 - hashMapImpl<U16 /*actionID*/, DELEGATE_CBK<> /*action*/> _inputActions;
131 + hashMapImpl<U16 /*actionID*/, InputAction> _inputActions;
132 + InputAction _noOPAction;
91 133 };
92 134
93 135 }; //namespace Divide