Torque3D/Templates/BaseGame/game/data/UI/guis/GameMenu.gui
AzaezelX ee4542ed80 simplify menu navigation button setup
remove position lookup logic for the choose level and choose game modes nav button icons in favor of the built in source side ones. The elements they relate to are centered as is, so set the encapsulating element for them to horizontal=centered as well, and the sub elements to thier respective left-and right as prepwork if someone *did* want to make the elements they reference scale hoizontally.
2026-06-24 21:11:12 -05:00

95 lines
3 KiB
Text

//--- OBJECT WRITE BEGIN ---
$guiContent = new GuiControl(GameMenu) {
extent = "1280 720";
profile = "GuiDefaultProfile";
tooltipProfile = "GuiToolTipProfile";
isContainer = "1";
canSaveDynamicFields = "1";
new GuiInputCtrl(GameMenuInputHandler) {
ignoreMouseEvents = "1";
ActionMap = "GameMenuActionMap";
position = "-50 0";
extent = "50 50";
horizSizing = "width";
vertSizing = "height";
profile = "GuiInputCtrlProfile";
tooltipProfile = "GuiToolTipProfile";
};
new GuiChunkedBitmapCtrl(GameMenuBG) {
BitmapAsset = "UI:hudfill_image";
extent = "1280 720";
horizSizing = "width";
vertSizing = "height";
profile = "GuiDefaultProfile";
tooltipProfile = "GuiToolTipProfile";
isContainer = "1";
canSaveDynamicFields = "1";
new GuiPanel(GameMenuTitlePanel) {
extent = "1281 60";
horizSizing = "width";
profile = "GuiMenuPanelProfile";
tooltipProfile = "GuiToolTipProfile";
new GuiStackControl(GameMenuButtonList){
position = "40 0";
extent = "1240 60";
profile = GuiDefaultProfile;
stackingType = "Horizontal";
padding = "10";
horizSizing = "center";
vertSizing = "center";
};
new GuiControl(GameMenuNavButtonOverlay) {
extent = "1280 60";
horizSizing = "center";
vertSizing = "height";
profile = GuiNonModalDefaultProfile;
new GuiBitmapCtrl(GameMenuPrevNavIcon) {
BitmapAsset = "UI:Keyboard_Black_Q_image";
position = "188 24";
extent = "40 40";
profile = GuiNonModalDefaultProfile;
vertSizing = "top";
horizSizing = "right";
};
new GuiBitmapCtrl(GameMenuNextNavIcon) {
BitmapAsset = "UI:Keyboard_Black_E_image";
position = "1050 24";
extent = "40 40";
profile = GuiNonModalDefaultProfile;
vertSizing = "top";
horizSizing = "left";
};
};
};
};
new GuiPanel(GameMenuButtonPanel) {
position = "0 683";
extent = "1281 40";
horizSizing = "width";
vertSizing = "top";
profile = "GuiMenuPanelProfile";
tooltipProfile = "GuiToolTipProfile";
new GuiIconButtonCtrl(GameMenuBackBtn) {
BitmapAsset = "UI:Keyboard_Black_Escape_image";
sizeIconToButton = "1";
makeIconSquare = "1";
textLocation = "Center";
text = "Back";
position = "16 0";
extent = "140 40";
vertSizing = "center";
profile = "GuiMenuButtonProfile";
command = "Canvas.popDialog(GameMenu);";
tooltipProfile = "GuiToolTipProfile";
class = "MenuInputButton";
};
};
};
//--- OBJECT WRITE END ---