Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-31-2007, 11:43 AM
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
parent delay?

Ive noticed a "delay" of some sort when parent.mod is being called upon "onCreated".

PHP Code:
//#CLIENTSIDE
function onCreated()
{
  new 
GuiWindowCtrl("ChatWindow_Main") {
    
width 200height 400;
    
screenwidth/width/2screenheight/height/2;
    
    
//visible = false;
    
    
new GuiMLTextCtrl("ChatWindow_Text") {
      
width parent.width 14height parent.height 30;
      
825;

      
setText("This is my text!");
    }
  }

When I do that, the width and height of ChatWindow_Text is at default value. However, it works if I do this:

PHP Code:
//#CLIENTSIDE
function onCreated()
{
  new 
GuiWindowCtrl("ChatWindow_Main") {
    
width 200height 400;
    
screenwidth/width/2screenheight/height/2;
    
    
//visible = false;
    
    
new GuiMLTextCtrl("ChatWindow_Text") {
      
width ChatWindow_Main.width 14height ChatWindow_Main.height 30;
      
825;


      
setText("This is my text!");
    }
  }


If I created the GUI first, and then try reading the parent values, they all match up to the proper value.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
 


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 12:07 AM.


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