I can't find answer on my question in AGS help and forum themes... I use gui with "POPup Modal" and if i press key SPACE - gui is visible, if i press SPACE again - gui is invisible. So in title screen i wanna disable this gui, but "Hide gui" function is not work with POPup modai i guess. How can i disable key press???
P.S. I use module :
function on_key_press(int keycode) {
if (keycode==32) {
if (gui[1].Visible==true) {
gui[1].Visible=false;
return; } //"return" stops running any more functions
else {
gui[1].Visible=true;
return; }
}
}
function on_key_press(int keycode) {
if (player.Room == TITLE_SCREEN_ROOM_NUMBER) keycode = 0;
if (keycode==32) {
Ã, if (gui[1].Visible==true) {
Ã, Ã, gui[1].Visible=false;
Ã, Ã, return; } //"return" stops running any more functions
Ã, else {
Ã, Ã, gui[1].Visible=true;
Ã, Ã, return; }
}
}
I think adding that line will help. Just change TITLE_SCREEN_ROOM_NUMBER to the number of the room that you are using as a title screen.
Seems work!
REspect Pablo! :)