HUD Creation - Resolved
by Drethon · in Torque Game Builder · 05/30/2009 (8:53 pm) · 0 replies
I found some information on creating a TGB HUD for a scroller (top down) by creating two separate Scene Windows so you don't have deal with mounting the HUD. I created it with the following code and can see the HUD but my mouse actions don't seem to go through to the lower Scene Window. Can this be made to work or should I be doing this by some other method?
[edit]
Figured out the right search to use, this did almost exactly what I need : www.garagegames.com/community/forums/viewthread/46820
mainScrene.gui
%guiContent = new GuiControl(mainScreenGui) {
canSaveDynamicFields = "0";
Profile = "GuiBlackContentProfile";
HorizSizing = "width";
VertSizing = "height";
Position = "0 0";
Extent = "1024 768";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
useVariable = "0";
new t2dSceneWindow(sceneWindow2D) {
canSaveDynamicFields = "0";
Profile = "GuiContentProfile";
HorizSizing = "width";
VertSizing = "height";
Position = "0 0";
Extent = "1024 768";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
lockMouse = "0";
useWindowMouseEvents = "1";
useObjectMouseEvents = "1";
};
new t2dSceneWindow(hudWindow2D) {
canSaveDynamicFields = "0";
Profile = "GuiContentProfile";
HorizSizing = "width";
VertSizing = "height";
Position = "0 0";
Extent = "1024 768";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
lockMouse = "0";
useWindowMouseEvents = "0";
useObjectMouseEvents = "1";
};
}
...
game.cs
sceneWindow2D.loadLevel(%level);
hudWindow2D.loadLevel(expandFilename("game/data/levels/HUD.t2d"));[edit]
Figured out the right search to use, this did almost exactly what I need : www.garagegames.com/community/forums/viewthread/46820