Game Development Community

GUI onload.

by Peterjohn Griffiths · in Torque Game Engine · 09/16/2006 (11:30 am) · 6 replies

Hi,
I was wondering if there was an onload event for a gui when it loads. I want to clear out a guiTextListCtrl when it loads and then refresh the data but I can't find anything to show me how this is done.
This is probably simple, and I have looked but can't find the answer.
Many thanks
Pejayuk

#1
09/17/2006 (10:30 am)
Has nobody got any idea on this?. I would of thought it possible.
#2
09/17/2006 (10:59 am)
MyGuiTextListCtrl.clear();
#3
09/17/2006 (1:45 pm)
Yep, thats the command I will use, but how to I create a Onload type event in the Gui to run this code.?
#4
09/17/2006 (2:01 pm)
I think I have found this out myself. Ive been trying to use,
function NetworkLoungeGui::init(){
   error("NetworkLoungeGui Loaded"); //Output to be displayed in console in RED for testing.
}
but with no joy. This isn't being called when the GUI is loaded and reloaded.
I have found however that the following does get called when the GUI is loaded and seems to be the equivelent of a onload function for a GUI.
function NetworkLoungeGui::onWake(){
   error("NetworkLoungeGui Loaded"); //Output to be displayed in console in RED for testing.
}
#5
09/17/2006 (2:27 pm)
Well the GUI's never "load" Gui's are all client side. onWake is probably what you're looking for all along.
#6
10/22/2006 (12:34 am)
You have onWake and onSleep methods.