View Single Post
  #29  
Old 01-22-2011, 02:10 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by oo_jazz_oo View Post
PHP Code:
externalwindow.x
externalwindow
.
Inside the gui control, of course.

(However, it seems when the window is initially created, it ignores the external.x/y position...and you need to set those after the window is visisble)

Found the post! http://forums.graalonline.com/forums...&postcount=746

Just thought I'd elaborate on your example there:

PHP Code:
//#CLIENTSIDE

function onCreated() {
  
createGUI();
}

function 
createGUI() {
  
// Destroy Existing Window for Testing purposes
  
if (isObject("HelloExample")) {
    
HelloExample.destroy();
  }
  
// Create Window
  
new GuiWindowCtrl("HelloExample") {
    
0;
    
0;
    
width 200;
    
height 200;
    
text "Hello World!";
    
profile GuiBlueWindowProfile;
    
isexternal true;
    
visible true;
    
externalwindow.30;
    
externalwindow.30;
  }
  
// Update Windows External X, Y
  // Work-around for current bug that causes it to ignore
  // external window values when created.
  
this.trigger("UpdateWindow""");
}

function 
onUpdateWindow() {
  
with (HelloExample) {
    
with (externalwindow) {
      
// Centers GUI in middle of screen.
      
= (screenwidth width) / 2;
      
= (screenheight height) / 2;
    }
  }

__________________
Quote:
Reply With Quote