View Single Post
  #20  
Old 08-11-2010, 06:10 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
For those who can't work from the snippet:

PHP Code:
//#CLIENTSIDE
function onCreated() {
  
createButton();
}

function 
createButton() {
  
with(Serverlist_TaskBar) {
    new 
GuiButtonCtrl("Serverlist_TaskButton_HelloWorld") {

      
useownprofile = true;

      
// Copy GUI Values from Main Button
      
for (temp.i: Serverlist_TaskButton_Main.getvarnames()) {
        if (
temp.i != icon) (@ temp.i) = Serverlist_TaskButton_Main.(@ temp.i);
      }

      
x = 500;
      
text = "Hello World";

      
// Draw Icon
      
seticonsize(20, 20);
      
icon.clearall();
      
icon.drawimagestretched(0, 0, icon.width, icon.height, "login_icon_developer4.png", 0, 0, 32, 32);
      
width += 10;
      
      
// Setup Action Event Catcher
      
thiso.catchevent(this, "onAction", "onHelloWorldClicked");
    }
  }
}

function 
onHelloWorldClicked() {
  
player.chat = "Whatup world!";
} 
__________________
Quote:
Reply With Quote