Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   gui prob (https://forums.graalonline.com/forums/showthread.php?t=68247)

excaliber7388 08-20-2006 08:57 PM

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

xXziroXx 08-20-2006 09:11 PM

in all the

PHP Code:

new guifuncwhatever(name)
{



, change this. to thiso.

Angel_Light 08-21-2006 01:54 AM

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.

excaliber7388 08-21-2006 05:59 AM

the thiso.mode, etc worked perfectly
:D


All times are GMT +2. The time now is 11:02 AM.

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