Game Development Community

Function call when GUI loaded

by Gavin Beard · in Torque Game Builder · 07/24/2008 (2:08 am) · 3 replies

Hi all,

just a simple one, but is the a function that i can create to get automatically called when a GUI is loaded, I.E. if i have a GUI called guiSettings, is there anything like:

function guiSettings::onLoad()
{

}

or am i missing something easier, i ony need to so i can load an image into a Bitmap control, but it is a dynamic image and hcnages alot

#1
07/24/2008 (2:18 am)
The callback "onWake" should do the trick (I think)
#2
07/24/2008 (2:32 am)
Yep

function guiSettings::onWake(%this)
{
...
}
#3
07/24/2008 (3:11 am)
Legend, thanks alot, just makes it easier to load an image of the current selected theme

ta