Add pan button for touch
This commit is contained in:
@@ -251,6 +251,7 @@ namespace OpenVulkano::Input
|
|||||||
{
|
{
|
||||||
BUTTON_TAP = 0,
|
BUTTON_TAP = 0,
|
||||||
BUTTON_TWO_FINGER_TAP,
|
BUTTON_TWO_FINGER_TAP,
|
||||||
|
BUTTON_PAN,
|
||||||
BUTTON_LAST = BUTTON_TWO_FINGER_TAP
|
BUTTON_LAST = BUTTON_TWO_FINGER_TAP
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -186,6 +186,9 @@ namespace OpenVulkano::Input
|
|||||||
|
|
||||||
void InputDeviceTouch::Tick()
|
void InputDeviceTouch::Tick()
|
||||||
{
|
{
|
||||||
|
if (m_nextPanInfo.position.x > 0 && m_nextPanInfo.position.y > 0)
|
||||||
|
m_toBePressedButtons |= 1 << InputKey::Touch::BUTTON_PAN; // Handle pan press
|
||||||
|
|
||||||
m_lastPressedButtons = m_pressedButtons;
|
m_lastPressedButtons = m_pressedButtons;
|
||||||
m_pressedButtons = m_toBePressedButtons;
|
m_pressedButtons = m_toBePressedButtons;
|
||||||
m_toBePressedButtons = 0;
|
m_toBePressedButtons = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user