mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-26 23:05:38 +00:00
Implements a more standardized way to format usual UI pages by having the ability to utilize the UINavigation namespace for page stack navigation
Also fixes behavior handling of menu input buttons not refreshing reliably Adds ability to define a control on a MenuList to act as a highlighter over the currently selected control Cleaned up BaseUI pages to use UINavigation which reduced a lot of duplication of elements and code
This commit is contained in:
parent
22db2d4291
commit
41add628ad
20 changed files with 811 additions and 1217 deletions
|
|
@ -1,41 +1,23 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
$guiContent = new GuiChunkedBitmapCtrl(MainMenuGui) {
|
||||
BitmapAsset = "UI:backgrounddark_image";
|
||||
useVariable = "0";
|
||||
tile = "0";
|
||||
position = "0 0";
|
||||
extent = "1024 768";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
Enabled = "1";
|
||||
isDecoy = "0";
|
||||
navigationIndex = "-1";
|
||||
superClass = "UINavigation";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiBitmapCtrl(MainMenuAppLogo) {
|
||||
BitmapAsset = "UI:Torque_3D_logo_alt_image";
|
||||
color = "255 255 255 255";
|
||||
wrap = "0";
|
||||
position = "550 30";
|
||||
extent = "443 139";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "left";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
autoFitExtents = "0";
|
||||
bitmapMode = "Stretched";
|
||||
|
|
@ -45,239 +27,98 @@ $guiContent = new GuiChunkedBitmapCtrl(MainMenuGui) {
|
|||
useModifiers = "0";
|
||||
useStates = "1";
|
||||
};
|
||||
new GuiStackControl(MainMenuButtonList) {
|
||||
stackingType = "Vertical";
|
||||
horizStacking = "Left to Right";
|
||||
vertStacking = "Top to Bottom";
|
||||
padding = "15";
|
||||
dynamicSize = "0";
|
||||
dynamicNonStackExtent = "0";
|
||||
dynamicPos = "0";
|
||||
changeChildSizeToFit = "1";
|
||||
changeChildPosition = "1";
|
||||
position = "312 111";
|
||||
extent = "400 477";
|
||||
minExtent = "16 16";
|
||||
horizSizing = "center";
|
||||
vertSizing = "center";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
class = "MenuList";
|
||||
|
||||
new GuiButtonCtrl(MainMenuSinglePlayerBtn) {
|
||||
text = "Single Player";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
position = "0 0";
|
||||
extent = "400 55";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "openSinglePlayerMenu();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiButtonCtrl(MainMenuCreateSrvrBtn) {
|
||||
text = "Create Server";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
position = "0 70";
|
||||
extent = "400 55";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "openMultiPlayerMenu();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiButtonCtrl(MainMenuJoinSrvrBtn) {
|
||||
text = "Join Server";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
position = "0 140";
|
||||
extent = "400 55";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "openJoinServerMenu();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiButtonCtrl(MainMenuOptionBtn) {
|
||||
text = "Options";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
position = "0 210";
|
||||
extent = "400 55";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "openOptionsMenu();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiButtonCtrl(MainMenuWorldEditBtn) {
|
||||
text = "Open World Editor";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
position = "0 280";
|
||||
extent = "400 55";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "openWorldEditorBtn();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiButtonCtrl(MainMenuGuiEditBtn) {
|
||||
text = "Open GUI Editor";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
position = "0 350";
|
||||
extent = "400 55";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "openGUIEditorBtn();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiButtonCtrl(MainMenuExitBtn) {
|
||||
text = "Exit";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
position = "0 420";
|
||||
extent = "400 55";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "quit();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
new GuiControl(MainMenuButtonHolder) {
|
||||
position = "189 711";
|
||||
extent = "646 40";
|
||||
minExtent = "8 2";
|
||||
position = "143 711";
|
||||
extent = "736 40";
|
||||
horizSizing = "center";
|
||||
vertSizing = "top";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
class = "MenuInputButtonContainer";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiIconButtonCtrl() {
|
||||
buttonMargin = "4 4";
|
||||
BitmapAsset = "UI:Keyboard_Black_Return_image";
|
||||
iconLocation = "Left";
|
||||
sizeIconToButton = "1";
|
||||
makeIconSquare = "1";
|
||||
textLocation = "Right";
|
||||
textMargin = "4";
|
||||
autoSize = "0";
|
||||
text = "Go";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
position = "507 0";
|
||||
position = "11 0";
|
||||
extent = "140 40";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "MainMenuButtonList.activateRow();";
|
||||
command = "MainMenuButtonList.activate();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "goButton";
|
||||
internalName = "button1";
|
||||
class = "MenuInputButton";
|
||||
};
|
||||
new GuiIconButtonCtrl() {
|
||||
BitmapAsset = "UI:Keyboard_Black_Return_image";
|
||||
sizeIconToButton = "1";
|
||||
makeIconSquare = "1";
|
||||
textLocation = "Right";
|
||||
text = "Go";
|
||||
position = "155 0";
|
||||
extent = "140 40";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
command = "MainMenuButtonList.activate();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
internalName = "button2";
|
||||
class = "MenuInputButton";
|
||||
};
|
||||
new GuiIconButtonCtrl() {
|
||||
BitmapAsset = "UI:Keyboard_Black_Return_image";
|
||||
sizeIconToButton = "1";
|
||||
makeIconSquare = "1";
|
||||
textLocation = "Right";
|
||||
text = "Go";
|
||||
position = "299 0";
|
||||
extent = "140 40";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
command = "MainMenuButtonList.activate();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
internalName = "button3";
|
||||
class = "MenuInputButton";
|
||||
};
|
||||
new GuiIconButtonCtrl() {
|
||||
BitmapAsset = "UI:Keyboard_Black_Return_image";
|
||||
sizeIconToButton = "1";
|
||||
makeIconSquare = "1";
|
||||
textLocation = "Right";
|
||||
text = "Go";
|
||||
position = "443 0";
|
||||
extent = "140 40";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
command = "MainMenuButtonList.activate();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
internalName = "button4";
|
||||
class = "MenuInputButton";
|
||||
};
|
||||
new GuiIconButtonCtrl() {
|
||||
BitmapAsset = "UI:Keyboard_Black_Return_image";
|
||||
sizeIconToButton = "1";
|
||||
makeIconSquare = "1";
|
||||
textLocation = "Right";
|
||||
text = "Go";
|
||||
position = "587 0";
|
||||
extent = "140 40";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
command = "MainMenuButtonList.activate();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
internalName = "button5";
|
||||
class = "MenuInputButton";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
new GuiInputCtrl(MainMenuInputHandler) {
|
||||
class = "MenuInputHandler";
|
||||
sendAxisEvents = "1";
|
||||
sendBreakEvents = "1";
|
||||
sendModifierEvents = "0";
|
||||
ignoreMouseEvents = "1";
|
||||
lockMouse = "0";
|
||||
position = "-50 0";
|
||||
extent = "10 10";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
profile = "GuiInputCtrlProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
class = "MenuInputHandler";
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue