Has anyone got any pointers how I can hide the GUI and make it appear when a key is pressed. The only thing that comes to mind is if any key is pressed, that key is stored into a variable, the GUI turns on and then that variable is placed in the textbox. This would work, but how would I have an "if any key A-Z is pressed"?
// main global script
int timer = 0;
// on_key_press
if ((keycode >= 65) && (keycode <= 90)) {
gParsergui.Visible = true;
/* set text on GUI...something like
Parsertextbox.Text = String.Format("%s%c", Parsertextbox.Text, keycode);
perhaps? */
timer = 10 * GetGameSpeed(); /* wait 10 seconds */
}
// rep_ex
if (timer > 0) timer--;
else gParsergui.Visible = false;
I hope you will find this useful. ;)
Unlike my previous attempt, in which I made a complete fool outta myself. :=
thanks, works a treat