mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-20 07:58:44 +00:00
Changed: Process EventCloseWindowId by client
This commit is contained in:
parent
0624da9c82
commit
f68cda5cd2
2 changed files with 9 additions and 2 deletions
|
@ -90,6 +90,7 @@ void CEventsListener::addToServer(CEventServer& server)
|
|||
server.addListener(EventKeyDownId, this);
|
||||
server.addListener(EventKeyUpId, this);
|
||||
server.addListener(EventDestroyWindowId,this);
|
||||
server.addListener(EventCloseWindowId, this);
|
||||
server.addListener(EventSetFocusId, this);
|
||||
server.addListener(EventDisplayChangeId, this);
|
||||
}// addToServer //
|
||||
|
@ -108,6 +109,7 @@ void CEventsListener::removeFromServer (CEventServer& server)
|
|||
server.removeListener(EventKeyDownId, this);
|
||||
server.removeListener(EventKeyUpId, this);
|
||||
server.removeListener(EventDestroyWindowId,this);
|
||||
server.removeListener(EventCloseWindowId, this);
|
||||
server.removeListener(EventSetFocusId, this);
|
||||
}// removeFromServer //
|
||||
|
||||
|
@ -141,6 +143,11 @@ void CEventsListener::operator()(const CEvent& event)
|
|||
// kill process
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
// Window close button pressed.
|
||||
if(event == EventCloseWindowId)
|
||||
{
|
||||
CAHManager::getInstance()->runActionHandler("enter_modal", NULL, "group=ui:interface:quit_dialog");
|
||||
}
|
||||
// Event from the Mouse (ANGLE)
|
||||
if(event == EventGDMouseMove)
|
||||
{
|
||||
|
|
|
@ -94,6 +94,7 @@ void CInputHandlerManager::addToServer(NLMISC::CEventServer * server)
|
|||
// System
|
||||
server->addListener(EventGDMouseMove, this);
|
||||
server->addListener(EventDestroyWindowId, this);
|
||||
server->addListener(EventCloseWindowId, this);
|
||||
server->addListener(EventSetFocusId, this);
|
||||
server->addListener(EventDisplayChangeId, this);
|
||||
|
||||
|
@ -118,6 +119,7 @@ void CInputHandlerManager::release()
|
|||
// System
|
||||
_EventServer->removeListener(EventGDMouseMove, this);
|
||||
_EventServer->removeListener(EventDestroyWindowId, this);
|
||||
_EventServer->removeListener(EventCloseWindowId, this);
|
||||
_EventServer->removeListener(EventSetFocusId, this);
|
||||
_EventServer->removeListener(EventDisplayChangeId, this);
|
||||
|
||||
|
@ -133,10 +135,8 @@ void CInputHandlerManager::release()
|
|||
_EventServer->removeListener(EventCharId, this);
|
||||
_EventServer->removeListener(EventKeyDownId, this);
|
||||
_EventServer->removeListener(EventKeyUpId, this);
|
||||
|
||||
}
|
||||
|
||||
|
||||
// ***************************************************************************
|
||||
void CInputHandlerManager::operator ()(const NLMISC::CEvent &event)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue