Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Code Gallery (https://forums.graalonline.com/forums/forumdisplay.php?f=179)
-   -   Set styles (https://forums.graalonline.com/forums/showthread.php?t=78087)

Chompy 12-27-2007 01:15 AM

Set styles
 
PHP Code:

//#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:
PHP Code:

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

Quote:

Originally Posted by zokemon (Post 1366102)
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

Quote:

Originally Posted by Kyranki (Post 1367040)
Simple, short and yet keeps organization and is very helpful.

++rep for you Chompmaster.

Thanks :D <3


All times are GMT +2. The time now is 04:31 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.