| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- $#include "Input.h"
- struct TouchState
- {
- int touchID_ @ touchID;
- IntVector2 position_ @ position;
- IntVector2 lastPosition_ @ lastPosition;
- IntVector2 delta_ @ delta;
- float pressure_ @ pressure;
- };
- struct JoystickState
- {
- unsigned GetNumButtons() const;
- unsigned GetNumAxes() const;
- unsigned GetNumHats() const;
-
- bool GetButtonDown(unsigned index) const;
- bool GetButtonPress(unsigned index) const;
- float GetAxisPosition(unsigned index) const;
- int GetHatPosition(unsigned index) const;
-
- tolua_readonly tolua_property__get_set unsigned numButtons;
- tolua_readonly tolua_property__get_set unsigned numAxes;
- tolua_readonly tolua_property__get_set unsigned numHats;
- };
- class Input : public Object
- {
- void SetToggleFullscreen(bool enable);
- void SetMouseVisible(bool enable);
- bool OpenJoystick(unsigned index);
- void CloseJoystick(unsigned index);
- bool DetectJoysticks();
-
- bool GetKeyDown(int key) const;
- bool GetKeyPress(int key) const;
- bool GetMouseButtonDown(int button) const;
- bool GetMouseButtonPress(int button) const;
- bool GetQualifierDown(int qualifier) const;
- bool GetQualifierPress(int qualifier) const;
- int GetQualifiers() const;
- IntVector2 GetMousePosition() const;
- const IntVector2& GetMouseMove() const;
- int GetMouseMoveX() const;
- int GetMouseMoveY() const;
- int GetMouseMoveWheel() const;
- unsigned GetNumTouches() const;
- TouchState* GetTouch(unsigned index) const;
- unsigned GetNumJoysticks() const;
- const String GetJoystickName(unsigned index) const;
- JoystickState* GetJoystick(unsigned index);
- bool GetToggleFullscreen() const;
- bool IsMouseVisible() const;
- bool HasFocus();
- bool IsMinimized() const;
-
- tolua_readonly tolua_property__get_set int qualifiers;
- tolua_readonly tolua_property__get_set IntVector2 mousePosition;
- tolua_readonly tolua_property__get_set IntVector2& mouseMove;
- tolua_readonly tolua_property__get_set int mouseMoveX;
- tolua_readonly tolua_property__get_set int mouseMoveY;
- tolua_readonly tolua_property__get_set int mouseMoveWheel;
- tolua_readonly tolua_property__get_set unsigned numTouches;
- tolua_readonly tolua_property__get_set unsigned numJoysticks;
- tolua_readonly tolua_property__get_set bool toggleFullscreen;
- tolua_property__is_set bool mouseVisible;
- tolua_readonly tolua_property__has_set bool focus;
- tolua_readonly tolua_property__is_set bool minimized;
- };
|