Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. More...


Author Topic: Targeting Windows.  (Read 2987 times)

0 Members and 1 Guest are viewing this topic.

mylesblasonato

  • Developer
  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 265
  • "Give up is to fail as sacrifice is to succeed"
    • View Profile
    • Royal Wins
Targeting Windows.
« on: July 26, 2008, 10:48:34 AM »

ok so i have a menu. I have a button on the side of the screen that isn't apart of the menu. When I click that button I want the menu to close.

Cheers ::beer
Myles Blasonato.
Logged
Lead Game Designer, Royal Wins.
@mylesblasonato
@royalwins
http://au.linkedin.com/pub/myles-blasonato/26/600/a38

mylesblasonato

  • Developer
  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 265
  • "Give up is to fail as sacrifice is to succeed"
    • View Profile
    • Royal Wins
Re: Targeting Windows.
« Reply #1 on: July 26, 2008, 10:52:09 AM »

Is there a function that closes all windows that are open?
Logged
Lead Game Designer, Royal Wins.
@mylesblasonato
@royalwins
http://au.linkedin.com/pub/myles-blasonato/26/600/a38

DocBass

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 136
    • View Profile
Re: Targeting Windows.
« Reply #2 on: July 26, 2008, 11:32:37 AM »

If you wanted to do something like that it would be easy to script.

Just have an array that stores references to all open windows. Have a button that, when clicked, runs a for loop, or while loop, however you want to do it, and cycles through the windows that closes the windows in turn. You can make them invisible, close them, whatever you want to do.

As far as your menu thing goes, is the menu a window? Is the button active all the time? It should be easy enough to have the button close a window. You should be able to figure it out by looking at the close buttons on the default windows and emulating that. If you can post perhaps some code or even screenshots, if you're willing, of how it is all set up it would be easier to guide you a bit.
Logged

mylesblasonato

  • Developer
  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 265
  • "Give up is to fail as sacrifice is to succeed"
    • View Profile
    • Royal Wins
Re: Targeting Windows.
« Reply #3 on: July 28, 2008, 05:00:01 AM »

Hi, na it's cool I figured it out I just stored the window in a global variable and accessed that.

Another problem though. Is there a way to change a scene right after load?

Cheers ::beer
Myles Blasonato.
Logged
Lead Game Designer, Royal Wins.
@mylesblasonato
@royalwins
http://au.linkedin.com/pub/myles-blasonato/26/600/a38
 

Page created in 0.04 seconds with 24 queries.