PDA

View Full Version : Gui Style setting


Twinny
10-16-2007, 11:29 AM
Could we get a readable setting to show what gui style the player has selected? Something like $pref::graal::guistyle? If it already exists, someone update the wiki :P

zokemon
10-16-2007, 11:42 AM
As well as an event like onGuiStyleChange() or something, please.

Crow
10-16-2007, 12:28 PM
*signs*
Yea, would be useful.

Twinny
10-16-2007, 12:37 PM
My bad. Exists in http://wiki.graal.net/index.php/Creation/Dev/Script/Clientside_Functions as $pref::video::defaultguistyle but not in http://wiki.graal.net/index.php/Creation/Dev/Script/Client .

zokemon
10-16-2007, 12:57 PM
That's because I just updated that right now. To tired to add all the new things to Script/Client right now though. Will tomorrow maybe.

Still, would be nice to have that function. I notice that if I set style to that it will change it as soon as I change my style in options but onResize() and such aren't called to resize the child guis :(

Admins
10-16-2007, 11:22 PM
Do something like this:


//#CLIENTSIDE
function onCreated() {
// Create a new window and set attributes
new GuiWindowCtrl("MyWindow") {
// Use the default skin
style = $pref::Video::defaultguistyle;

// Set the size of the window
clientrelative = true;
clientextent = {320, 200};

// Set the position
x = 120;
y = 80;

// Set the title of the window
text = "Hello Window";
}
}

function onDefaultStyleChanges() {
MyWindow.style = $pref::Video::defaultguistyle;
}

zokemon
10-16-2007, 11:41 PM
onDefaultStyleChanges()!
Thank you! ^^