Improved the handling of updating of text

This commit is contained in:
Robert Osfield
2014-05-20 08:35:39 +00:00
parent d917987938
commit 8346f0ebe1
3 changed files with 23 additions and 7 deletions

View File

@@ -39,13 +39,15 @@ bool Dialog::handleImplementation(osgGA::EventVisitor* ev, osgGA::Event* event)
switch(ea->getEventType())
{
case(osgGA::GUIEventAdapter::KEYDOWN):
//case(osgGA::GUIEventAdapter::KEYDOWN):
case(osgGA::GUIEventAdapter::KEYUP):
OSG_NOTICE<<"Key pressed : "<<ea->getKey()<<std::endl;
if (ea->getKey()==osgGA::GUIEventAdapter::KEY_Escape)
if (ea->getKey()=='c')
{
close();
dirty();
ea->setHandled(true);
return true;
}