Wintermute Engine Forum
Wintermute Engine => Technical forum => Topic started by: SOLO on June 22, 2012, 03:46:42 PM
-
Hi,
I hav created an options menu and all is working apart from when I press ESC to close the window or click on RETURN (which is named close in the window structure) the options menu(window) closes then opens up again, if I click on close or ESC again it closes and stays closed.
I am using the -
on "close"
{
Game.PlaySound("sounds\menuclose.ogg");
self.Close();
}
Method to close the window.
Any ideas?
Thanks
Solo
-
try
this.Close();
-
You can use either "this" or "self", they are equivalent.
SOLO's script is okay; if the window reopens, the problem is elsewhere, namely in the script that loads the window.
-
Ah found the issue, I had a duplicate menu script which was in the main path that caused the problem, removing that and all menus working fine now.
Thanks for the pointer. :)
Regards
SOLO