[Android-overlay] Support touch screen axises in native. Have a non-configurable main joystick on screen at this point.

This commit is contained in:
Ryan Houdek
2013-11-14 15:17:51 -06:00
parent 9d3d568ae4
commit feedee5c23
7 changed files with 305 additions and 69 deletions

View File

@ -67,7 +67,18 @@ namespace ButtonManager
void SetState(ButtonState state) { m_state = state; }
bool Pressed() { return m_state == BUTTON_PRESSED; }
~Button() { }
~Button() {}
};
class Axis
{
private:
float m_value;
public:
Axis() : m_value(0.0f) {}
void SetValue(float value) { m_value = value; }
float AxisValue() { return m_value; }
~Axis() {}
};
struct sBind
@ -107,10 +118,10 @@ namespace ButtonManager
};
void Init();
void DrawButtons();
bool GetButtonPressed(ButtonType button);
float GetAxisValue(ButtonType axis);
void TouchEvent(int button, int action);
void TouchAxisEvent(int axis, float value);
void GamepadEvent(std::string dev, int button, int action);
void GamepadAxisEvent(std::string dev, int axis, float value);
void Shutdown();