PDA

View Full Version : Set styles


Chompy
12-27-2007, 01:15 AM
//#CLIENTSIDE
function onCreated() {
this.style_objects = {
{"GraalControl", "Arzo.wba"},
{"Serverlist_TaskBar", "Arzo.wba"},
{"Serverlist_TaskBar_Menu", "Arzo.wba"},
{"F2LogWindow_Window", "Arzo.wba"},
{"DownloadProgress_Window", "Arzo.wba"}
};
for (temp.control : this.style_objects) {
(@ control[0]).style = (@ control[1]);
}
setTimer(0.05);
}
function onTimeout() {
for (temp.check : this.style_objects) {
if (check[1] != (@ check[0]).style) {
(@ check[0]).style = (@ check[1]);
}
}
setTimer(0.1);
}


Easy setup, just edit the 'this.style_objects" array where there members are:
[0]: Objectname
[1]: Name of style uploaded on the server

Adding folder for styles
I added a subfolder named 'guistyles' so it became 'levels/images/guistyles/'

Put this somewhere in your folder config on your server:

file images/guistyles/*.wba


Easy little script, enjoy. For any questions or suggestions etc, feel free to post. ^^

cbk1994
12-27-2007, 01:19 AM
looks like it could definetly help some starting servers. Good job!

zokemon
12-27-2007, 05:01 AM
Looks pretty cool but I don't like the timeout :frown:. You should just use events if you can (I think there is an event for when the GUI Style changes but I forgot what it was)

Kyranki
12-31-2007, 06:25 AM
Simple, short and yet keeps organization and is very helpful.

++rep for you Chompmaster.

Chompy
01-01-2008, 05:10 AM
Looks pretty cool but I don't like the timeout :frown:. You should just use events if you can (I think there is an event for when the GUI Style changes but I forgot what it was)

Yes, but players can still change their style back to what they want :)

I made this for servers who want.. Well, instead of editing GuiControls they can use .wba styles which can be much more cooler then the default GuiControls :P Giving their server a little personal touch. Would be cool to have servers hire people to make them .wba styles tho ;o

Simple, short and yet keeps organization and is very helpful.

++rep for you Chompmaster.

Thanks :D <3