Thread: gui prob
View Single Post
  #1  
Old 08-20-2006, 08:57 PM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388
gui prob

I can't get this to work, I'm trying to ake it change the gui, without using a different gui window.
PHP Code:
//#CLIENTSIDE
function onCreated()
{
  
refresh();
}
function 
refresh()
{
  
start_gui.showtop();
  if(
this.mode==0)
  {
    
this.txt_text "Welcome to Dark Rival! \nThe land has been taken over by an evil king, who wishes to rule the world. The most famous hero in the land has vanished, and now you must pick up where he left off, and defeat Ceverous.\nPress continue to move on.";
    
this.txt_posx 7;
    
this.txt_posy 24;
    
this.txt_extx 385;
    
this.txt_exty 100;
  }
  if(
this.mode==1)
  {
    
this.txt_text "Select your gender, this will have no effect on your stats";
    
this.txt_posx 7;
    
this.txt_posy 24;
    
this.txt_extx 385;
    
this.txt_exty 100;
  }
  new 
GuiWindowCtrl("start_gui")
  {
    
canResize false;
    
canMove true;
    
canMaximize false;
    
position = {screenwidth/5screenheight/5}; 
    
extent = {400,300};
    
text "Dark Rival start screen";
    new 
GuiMLTextCtrl("start_text")
    {
      
position = {this.txt_posxthis.txt_posy};
      
extent = {this.txt_extxthis.txt_exty};
      
text this.txt_text;
    }
    if(
this.mode==0)
    {
      new 
GuiButtonCtrl("start_continue")
      {
        
position = {7100};
        
extent = {38530};
        
text "Continue";
      }
    }
    else if(
this.mode==1)
    {
      new 
GuiButtonCtrl("start_male")
      {
        
position = {7100};
        
extent = {19330};
        
text "Male";
      }
      new 
GuiButtonCtrl("start_female")
      {
        
position = {200100};
        
extent = {19330};
        
text "Female";
      }
    }
  }
}
function 
start_continue.onAction()
{
  
this.mode++;
  
refresh();

Something stupid I'm sure
Reply With Quote