[AGDev-newbies] enter key question
Richard Bennett
rbennett at southlink.us
Wed Jun 14 20:51:52 BST 2006
Ok listers, here is a good question that I am not sure of the answer and what to be sure. The question is do I put a while not enter key or do I use another if statement here and where do I put it and how? It is a portion of a menu that Tom has sent me before. Here is the code. what I want is if they hit the enter key on "yes" then they will go to the yes module, but I am not sure if I would use:
"while(!key[KEY_ENTER])"
or if I would use:
"if(key[KEY_ENTER]) instead and where exactly would I put this before the first "if" statement here or what? Sorry if this is a stupid question, but I just can't figure it out. Or should I use some other type of statement. By the Way, I am doing this in C++. Thanks for the help guys.
void SelectMenuOption()
{
if(gMenu == gAnswer)
{
if(gLocation == 1)
{
Yes();
}
if(gLocation == 2)
{
No();
}
}
}
Richard Bennett *BEAN*
Georgia State Phi Beta Lambda(PBL) Secretary
personal e-mail:
rbennett at southlink.us
Windows Messenger(or MSN messenger):
ichabodsparrow at hotmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.agrip.org.uk/pipermail/agdev-newbies/attachments/20060614/fdb30655/attachment.htm
More information about the AGDev-newbies
mailing list