Re: Gui
by Richard Van Stone · in Torque Game Engine · 02/06/2005 (10:32 am) · 9 replies
I'm trying to create a split gui where the top 2/3 of the screen would be the normal play window. The bottom 1/3 would be the command hud. I do /not/ want the hud to just overlay ontop of the play window. I really do want the top hud shrunk. This is what I have so far...
//--- OBJECT WRITE BEGIN ---
new GuiControl(TheShell) {
profile = "GuiDefaultProfile";
horizSizing = "width";
vertSizing = "height";
position = "0 0";
extent = "640 480";
minExtent = "8 8";
visible = "1";
new GameTSCtrl(PlayGui) {
profile = "GuiContentProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "640 280";
minExtent = "8 8";
visible = "1";
helpTag = "0";
noCursor = "1";
};
new GuiControl(CommandHud) {
profile = "GuiHudProfile";
horizSizing = "right";
vertSizing = "top";
position = "0 280";
extent = "640 200";
minExtent = "8 8";
visible = "1";
};
};
//--- OBJECT WRITE END ---
For some reason the play area is still filling the screen. I tried deleting the .dso files but there still is no change. Any suggestions?
Oh....and this is how I want the game window to look

//--- OBJECT WRITE BEGIN ---
new GuiControl(TheShell) {
profile = "GuiDefaultProfile";
horizSizing = "width";
vertSizing = "height";
position = "0 0";
extent = "640 480";
minExtent = "8 8";
visible = "1";
new GameTSCtrl(PlayGui) {
profile = "GuiContentProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "640 280";
minExtent = "8 8";
visible = "1";
helpTag = "0";
noCursor = "1";
};
new GuiControl(CommandHud) {
profile = "GuiHudProfile";
horizSizing = "right";
vertSizing = "top";
position = "0 280";
extent = "640 200";
minExtent = "8 8";
visible = "1";
};
};
//--- OBJECT WRITE END ---
For some reason the play area is still filling the screen. I tried deleting the .dso files but there still is no change. Any suggestions?
Oh....and this is how I want the game window to look

About the author
#2
//--- OBJECT WRITE BEGIN ---
new GuiControl(TheShell) {
profile = "GuiDefaultProfile";
horizSizing = "width";
vertSizing = "height";
position = "0 0";
extent = "640 480";
minExtent = "8 8";
visible = "1";
new GameTSCtrl(PlayGui) {
profile = "GuiContentProfile";
horizSizing = "width";
vertSizing = "bottom";
position = "0 0";
extent = "640 480";
minExtent = "8 8";
visible = "1";
helpTag = "0";
noCursor = "1";
new GuiBitmapCtrl(CenterPrintDlg) {
profile = "CenterPrintProfile";
horizSizing = "center";
vertSizing = "center";
position = "45 230";
extent = "550 20";
minExtent = "8 8";
visible = "0";
helpTag = "0";
bitmap = "./hudfill.png";
wrap = "0";
new GuiMLTextCtrl(CenterPrintText) {
profile = "CenterPrintTextProfile";
horizSizing = "center";
vertSizing = "center";
position = "0 0";
extent = "546 12";
minExtent = "8 8";
visible = "1";
helpTag = "0";
lineSpacing = "2";
allowColorChars = "0";
maxChars = "-1";
};
};
new GuiBitmapCtrl(BottomPrintDlg) {
profile = "CenterPrintProfile";
horizSizing = "center";
vertSizing = "top";
position = "45 375";
extent = "550 20";
minExtent = "8 8";
visible = "0";
helpTag = "0";
bitmap = "./hudfill.png";
wrap = "0";
new GuiMLTextCtrl(BottomPrintText) {
profile = "CenterPrintTextProfile";
horizSizing = "center";
vertSizing = "center";
position = "0 0";
extent = "546 12";
minExtent = "8 8";
visible = "1";
helpTag = "0";
lineSpacing = "2";
allowColorChars = "0";
maxChars = "-1";
};
};
new GuiBitmapCtrl(LagIcon) {
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "572 3";
extent = "32 32";
minExtent = "8 8";
visible = "0";
helpTag = "0";
bitmap = "./lagIcon.png";
wrap = "0";
};
02/06/2005 (1:38 pm)
Ok...maybe it didn't work as well as I thought. It's not placing the second frameset underneath the first. It's still trying to put the second frame in the first frame. I think I know what's wrong, just don't know at this point how to fix it. Here's the updated lines of code. //--- OBJECT WRITE BEGIN ---
new GuiControl(TheShell) {
profile = "GuiDefaultProfile";
horizSizing = "width";
vertSizing = "height";
position = "0 0";
extent = "640 480";
minExtent = "8 8";
visible = "1";
new GameTSCtrl(PlayGui) {
profile = "GuiContentProfile";
horizSizing = "width";
vertSizing = "bottom";
position = "0 0";
extent = "640 480";
minExtent = "8 8";
visible = "1";
helpTag = "0";
noCursor = "1";
new GuiBitmapCtrl(CenterPrintDlg) {
profile = "CenterPrintProfile";
horizSizing = "center";
vertSizing = "center";
position = "45 230";
extent = "550 20";
minExtent = "8 8";
visible = "0";
helpTag = "0";
bitmap = "./hudfill.png";
wrap = "0";
new GuiMLTextCtrl(CenterPrintText) {
profile = "CenterPrintTextProfile";
horizSizing = "center";
vertSizing = "center";
position = "0 0";
extent = "546 12";
minExtent = "8 8";
visible = "1";
helpTag = "0";
lineSpacing = "2";
allowColorChars = "0";
maxChars = "-1";
};
};
new GuiBitmapCtrl(BottomPrintDlg) {
profile = "CenterPrintProfile";
horizSizing = "center";
vertSizing = "top";
position = "45 375";
extent = "550 20";
minExtent = "8 8";
visible = "0";
helpTag = "0";
bitmap = "./hudfill.png";
wrap = "0";
new GuiMLTextCtrl(BottomPrintText) {
profile = "CenterPrintTextProfile";
horizSizing = "center";
vertSizing = "center";
position = "0 0";
extent = "546 12";
minExtent = "8 8";
visible = "1";
helpTag = "0";
lineSpacing = "2";
allowColorChars = "0";
maxChars = "-1";
};
};
new GuiBitmapCtrl(LagIcon) {
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "572 3";
extent = "32 32";
minExtent = "8 8";
visible = "0";
helpTag = "0";
bitmap = "./lagIcon.png";
wrap = "0";
};
#3
profile = "GuiDefaultProfile";
horizSizing = "width";
vertSizing = "height";
position = "0 0";
extent = "653 485";
minExtent = "8 8";
visible = "1";
helpTag = "0";
fillColor = "0.000000 0.000000 0.000000 0.250000";
frameColor = "0.000000 1.000000 0.000000 1.000000";
textColor = "0.000000 1.000000 0.000000 1.000000";
showFill = "0";
showFrame = "0";
verticalOffset = "0.2";
distanceFade = "0.1";
damageFrameColor = "1.000000 0.600000 0.000000 1.000000";
damageFillColor = "0.000000 1.000000 0.000000 1.000000";
damageRect = "30 4";
};
new GuiHealthBarHud() {
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "top";
position = "14 315";
extent = "26 138";
minExtent = "8 8";
visible = "1";
helpTag = "0";
showFill = "1";
displayEnergy = "0";
showFrame = "1";
fillColor = "0.000000 0.000000 0.000000 0.500000";
frameColor = "0.000000 1.000000 0.000000 0.000000";
damageFillColor = "0.800000 0.000000 0.000000 1.000000";
pulseRate = "1000";
pulseThreshold = "0.5";
value = "1";
};
new GuiCrossHairHud() {
profile = "GuiDefaultProfile";
horizSizing = "center";
vertSizing = "center";
position = "304 224";
extent = "32 32";
minExtent = "8 8";
visible = "1";
helpTag = "0";
bitmap = "./crossHair";
wrap = "0";
damageFillColor = "0.000000 1.000000 0.000000 1.000000";
damageFrameColor = "1.000000 0.600000 0.000000 1.000000";
damageRect = "50 4";
damageOffset = "0 10";
};
new GuiBitmapCtrl() {
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "top";
position = "11 299";
extent = "32 172";
minExtent = "8 8";
visible = "1";
helpTag = "0";
bitmap = "./healthBar";
wrap = "0";
};
new GuiHealthBarHud() {
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "top";
position = "53 315";
extent = "26 138";
minExtent = "8 8";
visible = "1";
helpTag = "0";
showFill = "1";
displayEnergy = "1";
showFrame = "1";
fillColor = "0.000000 0.000000 0.000000 0.500000";
frameColor = "0.000000 1.000000 0.000000 0.000000";
damageFillColor = "0.000000 0.000000 0.800000 1.000000";
pulseRate = "1000";
pulseThreshold = "0.5";
value = "1";
};
new GuiBitmapCtrl() {
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "top";
position = "50 299";
extent = "32 172";
minExtent = "8 8";
visible = "1";
helpTag = "0";
bitmap = "./healthBar";
wrap = "0";
};
};
new GuiControl(CommandHud) {
profile = "GuiHudProfile";
horizSizing = "width";
vertSizing = "height";
position = "0 0";
extent = "640 200";
minExtent = "8 8";
visible = "1";
new GuiBitmapCtrl(CenterPrintDlg) {
profile = "CenterPrintProfile";
horizSizing = "center";
vertSizing = "center";
position = "45 230";
extent = "640 200";
minExtent = "8 8";
visible = "1";
helpTag = "0";
bitmap = "./hudfill.png";
wrap = "0";
};
};
};
//--- OBJECT WRITE END ---
02/06/2005 (1:38 pm)
New GuiShapeNameHud() {profile = "GuiDefaultProfile";
horizSizing = "width";
vertSizing = "height";
position = "0 0";
extent = "653 485";
minExtent = "8 8";
visible = "1";
helpTag = "0";
fillColor = "0.000000 0.000000 0.000000 0.250000";
frameColor = "0.000000 1.000000 0.000000 1.000000";
textColor = "0.000000 1.000000 0.000000 1.000000";
showFill = "0";
showFrame = "0";
verticalOffset = "0.2";
distanceFade = "0.1";
damageFrameColor = "1.000000 0.600000 0.000000 1.000000";
damageFillColor = "0.000000 1.000000 0.000000 1.000000";
damageRect = "30 4";
};
new GuiHealthBarHud() {
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "top";
position = "14 315";
extent = "26 138";
minExtent = "8 8";
visible = "1";
helpTag = "0";
showFill = "1";
displayEnergy = "0";
showFrame = "1";
fillColor = "0.000000 0.000000 0.000000 0.500000";
frameColor = "0.000000 1.000000 0.000000 0.000000";
damageFillColor = "0.800000 0.000000 0.000000 1.000000";
pulseRate = "1000";
pulseThreshold = "0.5";
value = "1";
};
new GuiCrossHairHud() {
profile = "GuiDefaultProfile";
horizSizing = "center";
vertSizing = "center";
position = "304 224";
extent = "32 32";
minExtent = "8 8";
visible = "1";
helpTag = "0";
bitmap = "./crossHair";
wrap = "0";
damageFillColor = "0.000000 1.000000 0.000000 1.000000";
damageFrameColor = "1.000000 0.600000 0.000000 1.000000";
damageRect = "50 4";
damageOffset = "0 10";
};
new GuiBitmapCtrl() {
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "top";
position = "11 299";
extent = "32 172";
minExtent = "8 8";
visible = "1";
helpTag = "0";
bitmap = "./healthBar";
wrap = "0";
};
new GuiHealthBarHud() {
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "top";
position = "53 315";
extent = "26 138";
minExtent = "8 8";
visible = "1";
helpTag = "0";
showFill = "1";
displayEnergy = "1";
showFrame = "1";
fillColor = "0.000000 0.000000 0.000000 0.500000";
frameColor = "0.000000 1.000000 0.000000 0.000000";
damageFillColor = "0.000000 0.000000 0.800000 1.000000";
pulseRate = "1000";
pulseThreshold = "0.5";
value = "1";
};
new GuiBitmapCtrl() {
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "top";
position = "50 299";
extent = "32 172";
minExtent = "8 8";
visible = "1";
helpTag = "0";
bitmap = "./healthBar";
wrap = "0";
};
};
new GuiControl(CommandHud) {
profile = "GuiHudProfile";
horizSizing = "width";
vertSizing = "height";
position = "0 0";
extent = "640 200";
minExtent = "8 8";
visible = "1";
new GuiBitmapCtrl(CenterPrintDlg) {
profile = "CenterPrintProfile";
horizSizing = "center";
vertSizing = "center";
position = "45 230";
extent = "640 200";
minExtent = "8 8";
visible = "1";
helpTag = "0";
bitmap = "./hudfill.png";
wrap = "0";
};
};
};
//--- OBJECT WRITE END ---
#4
02/06/2005 (1:39 pm)
The way it looks now is a hud inside of the main hud....it's really bizarre.
#5
www.garagegames.com/mg/forums/result.thread.php?qt=23640
frameCtrl is what the in game editor uses
02/06/2005 (3:47 pm)
Not using the guiFrameCtrl ?www.garagegames.com/mg/forums/result.thread.php?qt=23640
frameCtrl is what the in game editor uses
#6
02/06/2005 (3:58 pm)
Thank you, that's what I was searching the forum for all day.
#7
02/06/2005 (5:05 pm)
Sado showed me how to fix the problem in the gui editor. Now that's taken care of. The only problem I have now is that the mouse won't move the camera around. I suspect it has something to do with a focus issue....any ideas?
#8
no sleep = no brain power lol so I better crash
02/06/2005 (11:18 pm)
Hmm, not sure, might get a chance to help you more tomorrow... if your not using frameCtrl I'd recommend it, considering it was made for frames and the in game editors use it quite effectively... sorry I can't be of much help now =/ no sleep = no brain power lol so I better crash
#9
Rich
02/07/2005 (5:27 pm)
Well found the problem....I had to add noCursor = "1"; to my new top node guicontrol and it worked fine. Such a simple fix ;)Rich
Torque Owner Richard Van Stone
Rich