I'm trying to figure out how to do something that probably has a well known
solution but I can't find it.
I am writing a game with motion and animation, and I have a menu on my game
form that the user can use to start a new game, get help, etc. When the user
clicks the menu softkey, a menu pops up of course. If the user actually
selects a menu item then the item selection is processed - no problem.
However, I am having a problem recognizing the situation where the user
aborts the menu by clicking somewhere outside the popup menu. For example,
the user could popup the menu to see help but then decide he doesn't want
help after all and just click back in the game screen to get the game
started. The problem is that, since my code doesn't see an event for the
user clicking back in the game area, the game motion and animation doesn't
start up again.
I tried doing something that I found on the net, which involves checking for
a winEnterEvent. This event occurs when the user clicks in the game screen.
The code is the following:
if (event.eType == winEnterEvent) {
if (event.data.winEnter.enterWindow ==
(WinHandle) FrmGetFormPtr(backDisplay.form) &&
event.data.winEnter.enterWindow ==
(WinHandle) FrmGetFirstForm ()) {
// go back to game here
}
}
The problem is that this code seems to get executed even when the user
selects a menu item. It also seems to get executed when the user selects the
menu in the first place.
All I want is to recognize when the user clicks outside of the menu without
selecting any menu item. Isn't there some way to do this that doesn't get
triggered for other user actions?
Thanks.
[EMAIL PROTECTED]
_________________________________________________________________
Join the world�s largest e-mail service with MSN Hotmail.
http://www.hotmail.com
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/