Question/Suggestion - GUIOn event

Started by am, Mon 16/06/2003 20:17:07

Previous topic - Next topic

am

Is there an event that runs on GUIOn (like before fadein with room screens)?
If not - can it be implemented?

Scummbuddy

Are you asking for this?
The room interactions window that allows you to place actions that could go in 'before fade in' or 'after fade in'
Or this?
that you can do GuiOn();   GuiOff();

cause thats all available.
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

am

No, what I would like to have is an event, similar to the "before fade in", only for GUI's, e.g. when I call the function GUIOn(7), there is an event that gets called and aranges things in the GUI (add items to listbox, etc.).

Archangel (aka SoupDragon)

#3
You could probably do that in your script; for example

//in the code for whatever you want to trigger the gui

//set up your gui how you want it, then just
GuiOn(x);

Spyros

#4
Try the
if (IsGUIOn(7)==1) { your code here }

am

The problem is that the GUI is called from several places, and I don't want to repeat the code everywhere, also I need it to be done before the GUI is shown, so the if(IsGUIOn) won't help either.
What I currently do is I use a global function for averything that should be done, and I call it before loading the GUI, but I think an event will be a neeter solution.

Scummbuddy

Global ints.  Check for a global int to do different things to the gui before its called.
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

Pumaman

Create your own function in the global script, something like:


function JibbleGUIOn () {
 // setup the listboxes here
 GUIOn(7);
}

then in your normal scripts, just use

JibbleGUIOn();

instead of GUIOn(7);

SMF spam blocked by CleanTalk