fixes in Mac modifier keys, remove enet/lua tests
This commit is contained in:
@@ -29,7 +29,7 @@ struct DrawGridData
|
||||
|
||||
struct CommonGraphicsApp
|
||||
{
|
||||
class b3gWindowInterface* m_window;
|
||||
class CommonWindowInterface* m_window;
|
||||
struct CommonRenderInterface* m_renderer;
|
||||
struct CommonParameterInterface* m_parameterInterface;
|
||||
struct Common2dCanvasInterface* m_2dCanvasInterface;
|
||||
@@ -94,8 +94,8 @@ struct CommonGraphicsApp
|
||||
{
|
||||
CommonCameraInterface* camera = m_renderer->getActiveCamera();
|
||||
|
||||
bool isAltPressed = m_window->isModifiedKeyPressed(B3G_ALT);
|
||||
bool isControlPressed = m_window->isModifiedKeyPressed(B3G_CONTROL);
|
||||
bool isAltPressed = m_window->isModifierKeyPressed(B3G_ALT);
|
||||
bool isControlPressed = m_window->isModifierKeyPressed(B3G_CONTROL);
|
||||
|
||||
|
||||
if (isAltPressed || isControlPressed)
|
||||
|
||||
@@ -249,7 +249,6 @@ struct CommonMultiBodyBase : public ExampleInterface
|
||||
|
||||
virtual bool mouseButtonCallback(int button, int state, float x, float y)
|
||||
{
|
||||
|
||||
CommonRenderInterface* renderer = m_guiHelper->getRenderInterface();
|
||||
|
||||
if (!renderer)
|
||||
@@ -257,12 +256,13 @@ struct CommonMultiBodyBase : public ExampleInterface
|
||||
btAssert(0);
|
||||
return false;
|
||||
}
|
||||
|
||||
CommonWindowInterface* window = m_guiHelper->getAppInterface()->m_window;
|
||||
|
||||
b3gWindowInterface* window = m_guiHelper->getAppInterface()->m_window;
|
||||
|
||||
|
||||
if (state==1)
|
||||
{
|
||||
if(button==0 && (!window->isModifiedKeyPressed(B3G_ALT) && !window->isModifiedKeyPressed(B3G_CONTROL) ))
|
||||
if(button==0 && (!window->isModifierKeyPressed(B3G_ALT) && !window->isModifierKeyPressed(B3G_CONTROL) ))
|
||||
{
|
||||
btVector3 camPos;
|
||||
renderer->getActiveCamera()->getCameraPosition(camPos);
|
||||
|
||||
@@ -239,7 +239,6 @@ struct CommonRigidBodyBase : public ExampleInterface
|
||||
|
||||
virtual bool mouseButtonCallback(int button, int state, float x, float y)
|
||||
{
|
||||
|
||||
CommonRenderInterface* renderer = m_guiHelper->getRenderInterface();
|
||||
|
||||
if (!renderer)
|
||||
@@ -247,12 +246,39 @@ struct CommonRigidBodyBase : public ExampleInterface
|
||||
btAssert(0);
|
||||
return false;
|
||||
}
|
||||
|
||||
CommonWindowInterface* window = m_guiHelper->getAppInterface()->m_window;
|
||||
|
||||
b3gWindowInterface* window = m_guiHelper->getAppInterface()->m_window;
|
||||
|
||||
#if 0
|
||||
if (window->isModifierKeyPressed(B3G_ALT))
|
||||
{
|
||||
printf("ALT pressed\n");
|
||||
} else
|
||||
{
|
||||
printf("NO ALT pressed\n");
|
||||
}
|
||||
|
||||
if (window->isModifierKeyPressed(B3G_SHIFT))
|
||||
{
|
||||
printf("SHIFT pressed\n");
|
||||
} else
|
||||
{
|
||||
printf("NO SHIFT pressed\n");
|
||||
}
|
||||
|
||||
if (window->isModifierKeyPressed(B3G_CONTROL))
|
||||
{
|
||||
printf("CONTROL pressed\n");
|
||||
} else
|
||||
{
|
||||
printf("NO CONTROL pressed\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
if (state==1)
|
||||
{
|
||||
if(button==0 && (!window->isModifiedKeyPressed(B3G_ALT) && !window->isModifiedKeyPressed(B3G_CONTROL) ))
|
||||
if(button==0 && (!window->isModifierKeyPressed(B3G_ALT) && !window->isModifierKeyPressed(B3G_CONTROL) ))
|
||||
{
|
||||
btVector3 camPos;
|
||||
renderer->getActiveCamera()->getCameraPosition(camPos);
|
||||
|
||||
@@ -67,11 +67,11 @@ struct b3gWindowConstructionInfo
|
||||
};
|
||||
|
||||
|
||||
class b3gWindowInterface
|
||||
class CommonWindowInterface
|
||||
{
|
||||
public:
|
||||
|
||||
virtual ~b3gWindowInterface()
|
||||
virtual ~CommonWindowInterface()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ class b3gWindowInterface
|
||||
|
||||
virtual void endRendering()=0;
|
||||
|
||||
virtual bool isModifiedKeyPressed(int key) = 0;
|
||||
virtual bool isModifierKeyPressed(int key) = 0;
|
||||
|
||||
virtual void setMouseMoveCallback(b3MouseMoveCallback mouseCallback)=0;
|
||||
virtual b3MouseMoveCallback getMouseMoveCallback()=0;
|
||||
|
||||
Reference in New Issue
Block a user