Please login or register.

Login with username, password and session length
Advanced search  

News:

IRC channel - server: waelisch.de  channel: #wme (read more)

Author Topic: Menu not closing  (Read 1793 times)

0 Members and 1 Guest are viewing this topic.

SOLO

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 23
    • View Profile
Menu not closing
« 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
Logged
Best Regards
SOLO

eborr

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 195
    • View Profile
Re: Menu not closing
« Reply #1 on: June 23, 2012, 01:08:40 PM »

try

this.Close();
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5679
    • View Profile
    • Dead:Code Site
Re: Menu not closing
« Reply #2 on: June 23, 2012, 01:14:11 PM »

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.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

SOLO

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 23
    • View Profile
Re: Menu not closing
« Reply #3 on: June 25, 2012, 04:23:54 PM »

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
Logged
Best Regards
SOLO
 

Page created in 0.209 seconds with 23 queries.