View Single Post
  #4  
Old 05-10-2009, 04:33 PM
LoneAngelIbesu LoneAngelIbesu is offline
master of infinite loops
LoneAngelIbesu's Avatar
Join Date: May 2007
Location: Toldeo, Ohio
Posts: 1,049
LoneAngelIbesu has a spectacular aura aboutLoneAngelIbesu has a spectacular aura about
Send a message via AIM to LoneAngelIbesu
Can't you just join the object to a class?

Class guifunctions:
PHP Code:
//#CLIENTSIDE
function changetext(newtext) {
  
this.text temp.newtext;
  
player.chat "Changed text to " temp.newtext;

Weapon GUI:
PHP Code:
//#CLIENTSIDE
function onCreated() {
  new 
GuiButtonCtrl("MyButton") {
    
this.join("guifunctions");
    
this.profile GuiButtonProfile;
    
this.text "Some text";
  }
}
function 
MyButton.onAction() {
  
MyButton.changetext("Other text");

I haven't tested this specific one myself, but Inverness' GUI fading works this way; you join the window GUI to a class, and use MyWindow.fadein(), etc.

Though this is probably going to be considered a work-around, I find it more organized.
__________________
"We are all in the gutter, but some of us are looking at the stars."
— Oscar Wilde, Lady Windermere's Fan
Reply With Quote