use Control or Alt under Linux for Maya style mouse control (Ubuntu hijacks Alt)

This commit is contained in:
erwincoumans
2013-07-18 16:28:41 -07:00
parent a5b73e7c76
commit 392347b202
4 changed files with 25 additions and 10 deletions

View File

@@ -309,11 +309,11 @@ bool GpuRigidBodyDemo::keyboardCallback(int key, int state)
if (m_data)
{
if (key==B3G_ALT)
if (key==B3G_ALT )
{
m_data->m_altPressed = state;
m_data->m_altPressed = state;
}
if (key==B3G_CONTROL)
if (key==B3G_CONTROL )
{
m_data->m_controlPressed = state;
}
@@ -323,7 +323,7 @@ bool GpuRigidBodyDemo::keyboardCallback(int key, int state)
bool GpuRigidBodyDemo::mouseMoveCallback(float x,float y)
{
if (m_data->m_altPressed!=0)
if (m_data->m_altPressed!=0 || m_data->m_controlPressed!=0)
return false;
if (m_data->m_pickBody>=0 && m_data->m_pickConstraint>=0)
@@ -351,7 +351,7 @@ bool GpuRigidBodyDemo::mouseButtonCallback(int button, int state, float x, float
if (state==1)
{
if(button==0 && (m_data->m_altPressed==0))
if(button==0 && (m_data->m_altPressed==0 && m_data->m_controlPressed==0))
{
b3AlignedObjectArray<b3RayInfo> rays;
b3AlignedObjectArray<b3RayHit> hitResults;
@@ -444,4 +444,4 @@ bool GpuRigidBodyDemo::mouseButtonCallback(int button, int state, float x, float
//printf("button=%d, state=%d\n",button,state);
return false;
}
}

View File

@@ -1,3 +1,4 @@
#if 0
#include "ShadowMapDemo.h"
#include "ShadowMapDemoInternalData.h"
#include "OpenGLWindow/GLInstancingRenderer.h"
@@ -304,3 +305,6 @@ void ShadowMapDemo::renderScene()
}
#endif