Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Author Topic: Window Problem?  (Read 2710 times)

0 Members and 1 Guest are viewing this topic.

fsk

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 82
    • View Profile
    • My blog
Window Problem?
« on: August 13, 2007, 10:08:31 PM »

Hello Winters? I have a problem...

I made a menu.scene and load.window:
--------------------------------------

Menu.scene:
------------
New (Image Button)
Load (Image Button)
Option (Image Button)
Quit (Image Button)

---------------------------------------

Load.window:
-------------
Back (Image Button)

---------------------------------------

well,

when click in Load Button open the Load.window

everything is ok!

but,,, when i click to Back Button i can't close this window and i can't return to my main menu...i don't have the right code maybe...i try everything....

please, if anyone knows something....

thanx!!!
Logged

CMK2901

  • Lurker
  • *
  • Karma: 1
  • Offline Offline
  • Gender: Male
  • Posts: 35
  • Zoidberg is afoot!
    • View Profile
    • CMK Studios
Re: Window Problem?
« Reply #1 on: August 13, 2007, 11:56:44 PM »

When I need to close a window, I usually follow this sort of idea:

Code: [Select]
on "Back"
{
    LoadWin.Visible = false;
    Game.UnloadObject(LoadWin);
}

This is assuming that when you create the window you do something like this:

Code: [Select]
global LoadWin = Game.LoadWindow("interface/load/load.window");
LoadWin.Visible = true;

AND assuming that this is a load game window that will be used often throughout the entire game, I might also suggest that you make a global variable "LoadWin" in the "base.inc" file so that you have a single variable you use to hold a reference to the load window.

At least, that's how I would do it.
Logged
CMK Studios
I don't think we're hearing the same voices.

fsk

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 82
    • View Profile
    • My blog
Re: Window Problem?
« Reply #2 on: August 14, 2007, 01:13:40 PM »

thanks CMK2901 for your help!!!  ;)
Logged
 

Page created in 0.25 seconds with 24 queries.