Thread: Set styles
View Single Post
  #1  
Old 12-27-2007, 01:15 AM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
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.
__________________
Reply With Quote