View Full Version : Gui Style setting

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

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

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

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 .

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 :(

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

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;

10-16-2007, 11:41 PM
Thank you! ^^