From Daniel Sjölie, updates to the GUIEventAdapter and GLUTEventAdapter to handle
key and key down, modifiers and funcion keys.
This commit is contained in:
@@ -119,7 +119,7 @@ bool GliderManipulator::handle(const GUIEventAdapter& ea,GUIActionAdapter& us)
|
||||
return true;
|
||||
}
|
||||
|
||||
case(GUIEventAdapter::KEYBOARD):
|
||||
case(GUIEventAdapter::KEYDOWN):
|
||||
if (ea.getKey()==' ')
|
||||
{
|
||||
flushMouseEventStack();
|
||||
|
||||
@@ -134,7 +134,7 @@ bool TestManipulator::handle(const GUIEventAdapter& ea,GUIActionAdapter& us)
|
||||
return false;
|
||||
}
|
||||
|
||||
case(GUIEventAdapter::KEYBOARD):
|
||||
case(GUIEventAdapter::KEYDOWN):
|
||||
if (ea.getKey()==' ')
|
||||
{
|
||||
flushMouseEventStack();
|
||||
|
||||
@@ -91,7 +91,7 @@ bool OccluderEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIAct
|
||||
{
|
||||
switch(ea.getEventType())
|
||||
{
|
||||
case(osgGA::GUIEventAdapter::KEYBOARD):
|
||||
case(osgGA::GUIEventAdapter::KEYDOWN):
|
||||
{
|
||||
if (ea.getKey()=='a')
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ public:
|
||||
{
|
||||
bool handled = false;
|
||||
|
||||
if (ea.getEventType() == osgGA::GUIEventAdapter::KEYBOARD)
|
||||
if (ea.getEventType() == osgGA::GUIEventAdapter::KEYDOWN)
|
||||
{
|
||||
const char keys[] = "!@#$%^&*()";
|
||||
for (unsigned int i = 0; i < (sizeof(keys) / sizeof(keys[0])); i++) {
|
||||
|
||||
@@ -463,7 +463,7 @@ protected:
|
||||
}
|
||||
|
||||
|
||||
virtual void keyboard(unsigned char key, int x, int y)
|
||||
virtual void keyboard(int key, int x, int y)
|
||||
{
|
||||
switch(key)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user