News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.


Post Reply  Post Thread 
Escape Key exits window
Author Message
JohnMurga
Administrator
*******


Posts: 381
Group: Administrators
Joined: Apr 2007
Status: Offline
Reputation: 2
Post: #1
RE: Escape Key exits window

mikshaw Wrote:
What is the purpose of checking for event 12? (FL_DEACTIVATE?)


It's an FLTK inconsistency ... Basically if you just check for

Code:
Fl:event_key() == fltk.FL_Escape


Then it'll take a few clicks on the "close window" to exit the program, I was hoping that the event type for escape was "KEYBOARD", but it was something else (12), while for "close window" it was 10 (I think), so I just used 12.

I know, a little bit hacky, but I was in a hurry :-)

Maybe it's enough to just check for event 12, but this is a pretty robust check.

Cheers
JohnM

06-23-2007 01:57 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Messages In This Thread
Escape Key exits window - iGame3D - 06-21-2007, 06:39 AM
RE: Escape Key exits window - mikshaw - 06-22-2007, 07:38 AM
RE: Escape Key exits window - JohnMurga - 06-22-2007, 10:02 PM
RE: Escape Key exits window - JohnMurga - 06-23-2007, 12:29 AM
RE: Escape Key exits window - mikshaw - 06-23-2007, 01:34 AM
RE: Escape Key exits window - JohnMurga - 06-23-2007 01:57 AM
RE: Escape Key exits window - mikshaw - 06-23-2007, 06:22 AM

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: