Switch between Gui
by Splouch · in Torque Developer Network · 02/21/2009 (6:06 am) · 4 replies
Hi guys,
I'm calling for your help in Tgea 1.7.0 ... I've been stucked for a week, now, on it :(
I've created a gui (let's call it chat.gui) containing a chat (a textbox for the chat logs and a text area to enter messages). I've the main plateform game called play.gui which has all my hud. I'd like to call my chat.gui after pusching a button on play.gui to display all th chat stuff.
I got set the call to chat.gui (so my chat display is ok, i can send messages to the server and display all of them on my textbox).
The problem : Unfortunately, while chatting, i can't reach the background, so play.gui. The main purpose is to open and close the chat 's windows by pusching the chat button placed on play.gui
(synops: How to switch between 2 guis. Displaying the gui "B" on gui "A" while "A" still active and where we still can interact with it)
If anyone could have a piece of solution to my problem, i thank you very much in advance;
cheers,
Sploutch
I'm calling for your help in Tgea 1.7.0 ... I've been stucked for a week, now, on it :(
I've created a gui (let's call it chat.gui) containing a chat (a textbox for the chat logs and a text area to enter messages). I've the main plateform game called play.gui which has all my hud. I'd like to call my chat.gui after pusching a button on play.gui to display all th chat stuff.
I got set the call to chat.gui (so my chat display is ok, i can send messages to the server and display all of them on my textbox).
The problem : Unfortunately, while chatting, i can't reach the background, so play.gui. The main purpose is to open and close the chat 's windows by pusching the chat button placed on play.gui
(synops: How to switch between 2 guis. Displaying the gui "B" on gui "A" while "A" still active and where we still can interact with it)
If anyone could have a piece of solution to my problem, i thank you very much in advance;
cheers,
Sploutch
About the author
#2
No, i do need control over things while typing a message (at least the mouse to move over the game). i've a button defined in Play.gui to display the chatbox (so chat.gui) But when i want to close it by pushing the same button, i don't have any control on it, so can't close the chatbox (so i can't reach anythings defined on chat.gui).
02/21/2009 (2:48 pm)
hi Scott,No, i do need control over things while typing a message (at least the mouse to move over the game). i've a button defined in Play.gui to display the chatbox (so chat.gui) But when i want to close it by pushing the same button, i don't have any control on it, so can't close the chatbox (so i can't reach anythings defined on chat.gui).
#3
It is because your new chat.gui layer is over the play.gui layer. Did you make your chat.gui using GuiControl? I suppose so. In that case,
add the line 'noCursor = 1;'. So, it will look like this.
new GuiControl(newChatGui) {
canSaveDynamicFields = "0";
Profile = "GuiModelessDialogProfile";
HorizSizing = "width";
VertSizing = "height";
position = "0 0";
Extent = "640 480";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
hovertime = "1000";
noCursor = 1;
03/02/2009 (5:40 pm)
@Splouch,It is because your new chat.gui layer is over the play.gui layer. Did you make your chat.gui using GuiControl? I suppose so. In that case,
add the line 'noCursor = 1;'. So, it will look like this.
new GuiControl(newChatGui) {
canSaveDynamicFields = "0";
Profile = "GuiModelessDialogProfile";
HorizSizing = "width";
VertSizing = "height";
position = "0 0";
Extent = "640 480";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
hovertime = "1000";
noCursor = 1;
Associate Scott Burns
GG Alumni