Skip to content
Snippets Groups Projects
Commit 486db463 authored by Nicholas Milef's avatar Nicholas Milef
Browse files

CLEANUP: named mouse state enum

parent fdef8c77
No related branches found
No related tags found
No related merge requests found
......@@ -197,7 +197,7 @@ VulkanInteractorStyle::OnMouseMove(double x, double y)
void
VulkanInteractorStyle::OnLeftButtonDown()
{
m_state |= VulkanInteractorStyle::LEFT_MOUSE_DOWN;
m_state |= (unsigned int)VulkanInteractorStyle::MouseState::LEFT_MOUSE_DOWN;
if (m_onLeftButtonDownFunction && m_onLeftButtonDownFunction(this))
{
......@@ -213,7 +213,7 @@ VulkanInteractorStyle::OnLeftButtonDown()
void
VulkanInteractorStyle::OnLeftButtonUp()
{
m_state &= ~VulkanInteractorStyle::LEFT_MOUSE_DOWN;
m_state &= ~(unsigned int)VulkanInteractorStyle::MouseState::LEFT_MOUSE_DOWN;
if (m_onLeftButtonUpFunction && m_onLeftButtonUpFunction(this))
{
......@@ -229,7 +229,7 @@ VulkanInteractorStyle::OnLeftButtonUp()
void
VulkanInteractorStyle::OnMiddleButtonDown()
{
m_state |= VulkanInteractorStyle::MIDDLE_MOUSE_DOWN;
m_state |= (unsigned int)VulkanInteractorStyle::MouseState::MIDDLE_MOUSE_DOWN;
if (m_onMiddleButtonDownFunction && m_onMiddleButtonDownFunction(this))
{
......@@ -245,7 +245,7 @@ VulkanInteractorStyle::OnMiddleButtonDown()
void
VulkanInteractorStyle::OnMiddleButtonUp()
{
m_state &= ~VulkanInteractorStyle::MIDDLE_MOUSE_DOWN;
m_state &= ~(unsigned int)VulkanInteractorStyle::MouseState::MIDDLE_MOUSE_DOWN;
if (m_onMiddleButtonUpFunction && m_onMiddleButtonUpFunction(this))
{
......@@ -261,7 +261,7 @@ VulkanInteractorStyle::OnMiddleButtonUp()
void
VulkanInteractorStyle::OnRightButtonDown()
{
m_state |= VulkanInteractorStyle::RIGHT_MOUSE_DOWN;
m_state |= (unsigned int)VulkanInteractorStyle::MouseState::RIGHT_MOUSE_DOWN;
if (m_onRightButtonDownFunction && m_onRightButtonDownFunction(this))
{
......@@ -277,7 +277,7 @@ VulkanInteractorStyle::OnRightButtonDown()
void
VulkanInteractorStyle::OnRightButtonUp()
{
m_state &= ~VulkanInteractorStyle::RIGHT_MOUSE_DOWN;
m_state &= ~(unsigned int)VulkanInteractorStyle::MouseState::RIGHT_MOUSE_DOWN;
if (m_onRightButtonUpFunction && m_onRightButtonUpFunction(this))
{
......
......@@ -95,7 +95,7 @@ private:
StopWatch m_stopWatch;
// States
enum
enum class MouseState
{
LEFT_MOUSE_DOWN = 0x1,
MIDDLE_MOUSE_DOWN = 0x2,
......
......@@ -90,7 +90,7 @@ VulkanInteractorStyleFreeCamera::OnTimer()
m_mousePosLastNormalized[1] = m_mousePosNormalized[1];
// The following is only for movement mode
if (!(m_state & VulkanInteractorStyleFreeCamera::RIGHT_MOUSE_DOWN))
if (!(m_state & (unsigned int)VulkanInteractorStyleFreeCamera::MouseState::RIGHT_MOUSE_DOWN))
{
return;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment