View Single Post
  #1  
Old 04-16-2011, 12:16 AM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
My first Crack at GUI

I thought about making this for a while but never got around to doing it but here it is. Its simple, but it works.

PHP Code:
//#CLIENTSIDE
function onCreated() {
  new 
GuiWindowCtrl("ServerList_Window1") {
    
profile GuiRedWindowProfile;
    
clientrelative true;
    
clientextent "104,374";

    
alpha 5;
    
canclose false;
    
canmaximize false;
    
canminimize false;
    
canmove false;
    
canresize true;
    
closequery false;
    
destroyonhide false;
    
text "Serverlist";
    
1050;
    
100;

    new 
GuiButtonCtrl("ServerList_Button1") {
      
profile GuiRedButtonProfile;
      
text "Login";
      
width 80;
      
10;
      
10;
    }
    new 
GuiButtonCtrl("ServerList_Button4") {
      
profile GuiRedButtonProfile;
      
text "Zone";
      
width 80;
      
10;
      
50;
    }
    new 
GuiButtonCtrl("ServerList_Button5") {
      
profile GuiRedButtonProfile;
      
text "Kingdoms";
      
width 80;
      
10;
      
90;
    }
    new 
GuiButtonCtrl("ServerList_Button6") {
      
profile GuiRedButtonProfile;
      
text "Zodiac";
      
width 80;
      
10;
      
130;
    }
    new 
GuiButtonCtrl("ServerList_Button7") {
      
profile GuiRedButtonProfile;
      
text "Era";
      
width 80;
      
10;
      
170;
    }
    new 
GuiButtonCtrl("ServerList_Button8") {
      
profile GuiRedButtonProfile;
      
text "Unholy N";
      
width 80;
      
10;
      
210;
    }
    new 
GuiButtonCtrl("ServerList_Button9") {
      
profile GuiRedButtonProfile;
      
text "Valikorlia";
      
width 80;
      
10;
      
250;
    }
    new 
GuiButtonCtrl("ServerList_Button10") {
      
profile GuiRedButtonProfile;
      
text "AEON";
      
width 80;
      
10;
      
290;
    }
    new 
GuiButtonCtrl("ServerList_Button11") {
      
profile GuiRedButtonProfile;
      
text "Maloria";
      
width 80;
      
10;
      
330;
    }
  }
}

function 
ServerList_Button1.onAction() {
  
// Button "Login" has been pressed
  
ServerWarp("Login");
}

function 
ServerList_Button4.onAction() {
  
// Button "Zone" has been pressed
  
ServerWarp("Zone");
}

function 
ServerList_Button5.onAction() {
  
// Button "Kingdoms" has been pressed
  
ServerWarp("Graal Kingdoms");
}

function 
ServerList_Button6.onAction() {
  
// Button "Zodiac" has been pressed
  
ServerWarp("Zodiac");
}

function 
ServerList_Button7.onAction() {
  
// Button "Era" has been pressed
  
ServerWarp("Era");
}

function 
ServerList_Button8.onAction() {
  
// Button "Unholy N" has been pressed
  
ServerWarp("Unholy Nation");
}

function 
ServerList_Button9.onAction() {
  
// Button "Valikorlia" has been pressed
  
ServerWarp("Valikorlia");
}

function 
ServerList_Button10.onAction() {
  
// Button "AEON" has been pressed
  
ServerWarp("AEON");
}

function 
ServerList_Button11.onAction() {
  
// Button "Maloria" has been pressed
  
ServerWarp("Maloria");

__________________
Reply With Quote