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 
Space Bar presses FLTK buttons
Author Message
Junior Member

Posts: 14
Group: Registered
Joined: Mar 2008
Status: Offline
Reputation: 0
Post: #1
RE: Space Bar presses FLTK buttons

Well how can I make sure nothing is focused?

I did a little hack to make sure this particular button doesn't execute its default command every single time its pressed, but its hacky at best and I still have instances where the space bar grabs a button I don't want it to grab.

Basically this button in question is loading a game level, so I tested to see if the level was loaded and game mode was set, then it won't freak out. However I have another interface where a button sets the camera mode, after you turn the button/camera off, hitting the space bar gets the button again! This happens when in game mode and the game script is polling the space bar for something, like jumping.

Ideally there must be a way to deselect a whole interface or prevent the space bar from doing its wacky button press. I tried hiding the button in question, FLTK then pressed the next button available with space bar.

I suppose I could check the keyboard and then exit my functions if the space key has been pressed? Ah the simple solution becomes clear in the daylight.

09-18-2008 04:10 AM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Messages In This Thread
Space Bar presses FLTK buttons - MrBill - 09-17-2008, 06:01 AM
RE: Space Bar presses FLTK buttons - MrBill - 09-18-2008 04:10 AM

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

Forum Jump: