Game Development Community

GameTSCtrl and mutiple different interfaces

by Andrew13 · in Torque Game Engine Advanced · 04/22/2009 (5:28 pm) · 2 replies

I have more then one " dashboard " or "HUD" that i want to display in game . Under condition A then dashboard should be visible , while under condition B dashboard B should be visible while A is not .

Created my two displays in the GUi editor. However makes Dashboard B visible with the command

Canvas.SetContent =dash_b.gui

makes dashboard b visible but rest of the screen is bright pink .

Not what i intended.

I understand that GameTSCtrl is the main game screen but how does one completely swap between two GUIs while retaining the rest of the visible game screen ?

#1
04/22/2009 (6:18 pm)
You just push/pop new guis on top of the playgui. You don't need to replace it completely.

Canvas.popDialog(DashboardB);
Canvas.pushDialog(DashboardA);

There are a ton of different ways to do this. This thread has some more detail:

www.garagegames.com/community/forums/viewthread/89373
#2
04/23/2009 (5:38 pm)
Thanks Jaimi

I will give those a try .