Quote:
Originally Posted by oo_jazz_oo
PHP Code:
externalwindow.x
externalwindow.y
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") {
x = 0;
y = 0;
width = 200;
height = 200;
text = "Hello World!";
profile = GuiBlueWindowProfile;
isexternal = true;
visible = true;
externalwindow.x = 30;
externalwindow.y = 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.
x = (screenwidth - width) / 2;
y = (screenheight - height) / 2;
}
}
}