GUI Question ...
by Derelict · in Torque Game Builder · 02/12/2008 (10:31 pm) · 1 replies
Hello and thanks for taking the time to contemplate my issue, however minor it may be!
My issue deals with popping a GUI--which I can accomplish just fine--however, I'm having a couple issues with the resulting GUI that I can't seem to figure out how to resolve.
Issue 1) The popped GUI (i.e., Canvas.pushDialog(x)) is set to a position of 600, 0 with an extent of 200, 50. This on an 800x600 screen--in other words, it should appear as a 200x50 pixel frame in the top right corner. At times (absent of issue 2), it does precisely this. However, it appears that a GUI still takes up the entire extent of the screen, even with settings that, presumably, should make it otherwise.
The result is that the GUI appears and works properly, as expected, but it invisibly "covers" the entire play area, preventing me from being able to click or right-click on scene objects that are now behind the popped GUI. Is this by intention? Do I need to setup a GUI and somehow utilize it with sceneWindow2D.setContent(x) instead? That is, are popped GUIs really intended as dialogs of some sort instead of how I'm apparently trying to use it?
Issue 2) For some reason I'm absent of understanding, the GUI will sometimes simply decide to reposition itself to 0, 0 (and resizing entirely the extent to 800, 600) instead of maintaining the position of 600, 50 that I've declared for it. I've even tried only editing the .gui file directly (i.e., notepad) so as to be certain that it isn't something in the GUI editor that I'm doing or is resetting it for whatever reason. Once it "resets" it stays that way, so far as I can tell.
The result is that the visible GUI appears in the top left corner instead of the desired location to the top-right.
Anyhow, any input or direction on this would be appreciated!
Thanks!
My issue deals with popping a GUI--which I can accomplish just fine--however, I'm having a couple issues with the resulting GUI that I can't seem to figure out how to resolve.
Issue 1) The popped GUI (i.e., Canvas.pushDialog(x)) is set to a position of 600, 0 with an extent of 200, 50. This on an 800x600 screen--in other words, it should appear as a 200x50 pixel frame in the top right corner. At times (absent of issue 2), it does precisely this. However, it appears that a GUI still takes up the entire extent of the screen, even with settings that, presumably, should make it otherwise.
The result is that the GUI appears and works properly, as expected, but it invisibly "covers" the entire play area, preventing me from being able to click or right-click on scene objects that are now behind the popped GUI. Is this by intention? Do I need to setup a GUI and somehow utilize it with sceneWindow2D.setContent(x) instead? That is, are popped GUIs really intended as dialogs of some sort instead of how I'm apparently trying to use it?
Issue 2) For some reason I'm absent of understanding, the GUI will sometimes simply decide to reposition itself to 0, 0 (and resizing entirely the extent to 800, 600) instead of maintaining the position of 600, 50 that I've declared for it. I've even tried only editing the .gui file directly (i.e., notepad) so as to be certain that it isn't something in the GUI editor that I'm doing or is resetting it for whatever reason. Once it "resets" it stays that way, so far as I can tell.
The result is that the visible GUI appears in the top left corner instead of the desired location to the top-right.
Anyhow, any input or direction on this would be appreciated!
Thanks!
Torque Owner Derelict
1) The trick here was to set the main (parent) GUI Control to GUIModelessDialogProfile--anything transparent on the GUI would be click-through-able when it was pushed onto the Canvas.
2) The issue of the GUI resetting on me was due to quirkiness that is generally avoided by #1--GUIs are intended to cover the entire extent of the Canvas, it would appear, and use of the GUIModelessDialogProfile mentioned above circumvents any such concerns that it might otherwise bring.