Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #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
  #2  
Old 08-20-2006, 09:11 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
in all the

PHP Code:
new guifuncwhatever(name)
{


, change this. to thiso.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #3  
Old 08-21-2006, 01:54 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
i had to do something similiar like this. Here's what I did.

PHP Code:
function onTimeOut() {
  
Master_Gui_Text_Account.setText  "Account : " player.account); 
  
Message_Board.width Message_Window.width-25;

I'm not sure if this is what your asking for but, it might help.
Also, they might not be the most efficent but they work great for me.
__________________
Deep into the Darkness peering...
Reply With Quote
  #4  
Old 08-21-2006, 05:59 AM
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
the thiso.mode, etc worked perfectly
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 02:13 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.