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:
JeffR 2022-05-06 23:39:16 -05:00
parent 22db2d4291
commit 41add628ad
20 changed files with 811 additions and 1217 deletions

View file

@ -1,178 +1,163 @@
//--- OBJECT WRITE BEGIN ---
$guiContent = new GuiControl(PauseMenu) {
position = "0 0";
extent = "1024 768";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
superClass = "UINavigation";
canSaveDynamicFields = "1";
tamlReader = "19772";
tile = "0";
useVariable = "0";
new GuiChunkedBitmapCtrl(PauseMenuBG) {
bitmapAsset = "UI:hudfill_image";
useVariable = "0";
tile = "0";
position = "0 0";
BitmapAsset = "UI:hudfill_image";
extent = "1024 768";
minExtent = "8 2";
horizSizing = "width";
vertSizing = "height";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "1";
};
new GuiControl() {
position = "162 125";
extent = "700 518";
minExtent = "8 2";
horizSizing = "center";
vertSizing = "center";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
new GuiStackControl(PauseMenuList) {
stackingType = "Vertical";
horizStacking = "Left to Right";
vertStacking = "Top to Bottom";
padding = "15";
dynamicSize = "0";
dynamicNonStackExtent = "0";
dynamicPos = "0";
changeChildSizeToFit = "1";
changeChildPosition = "1";
position = "0 0";
extent = "700 320";
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";
superClass = "MenuList";
new GuiButtonCtrl() {
text = "Options";
extent = "700 55";
profile = "GuiMenuButtonProfile";
command = "openPauseMenuOptions();";
tooltipProfile = "GuiToolTipProfile";
};
new GuiButtonCtrl() {
text = "Exit to Menu";
position = "0 70";
extent = "700 55";
profile = "GuiMenuButtonProfile";
command = "pauseMenuExitToMenu();";
tooltipProfile = "GuiToolTipProfile";
};
new GuiButtonCtrl() {
text = "Exit to Desktop";
position = "0 140";
extent = "700 55";
profile = "GuiMenuButtonProfile";
command = "pauseMenuExitToDesktop();";
tooltipProfile = "GuiToolTipProfile";
};
};
};
new GuiControl(PauseButtonHolder) {
position = "189 711";
extent = "646 40";
minExtent = "8 2";
position = "144 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";
iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter";
iconLocation = "Left";
BitmapAsset = "UI:Keyboard_Black_Return_image";
sizeIconToButton = "1";
makeIconSquare = "1";
textLocation = "Right";
textMargin = "4";
autoSize = "0";
text = "OK";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "363 0";
position = "11 0";
extent = "140 40";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiMenuButtonProfile";
visible = "1";
active = "1";
command = "PauseMenuList.activateRow();";
visible = "0";
active = "0";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
internalName = "goButton";
internalName = "button1";
class = "MenuInputButton";
canSave = "1";
canSaveDynamicFields = "0";
hidden = "1";
};
new GuiIconButtonCtrl() {
buttonMargin = "4 4";
iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Esc";
iconLocation = "Left";
BitmapAsset = "UI:Keyboard_Black_Return_image";
sizeIconToButton = "1";
makeIconSquare = "1";
textLocation = "Right";
textMargin = "4";
autoSize = "0";
text = "Back";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "507 0";
position = "155 0";
extent = "140 40";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiMenuButtonProfile";
visible = "1";
active = "1";
command = "Canvas.popDialog();";
visible = "0";
active = "0";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
internalName = "backButton";
internalName = "button2";
class = "MenuInputButton";
canSave = "1";
canSaveDynamicFields = "0";
hidden = "1";
};
new GuiIconButtonCtrl() {
BitmapAsset = "UI:Keyboard_Black_Return_image";
sizeIconToButton = "1";
makeIconSquare = "1";
textLocation = "Right";
position = "299 0";
extent = "140 40";
profile = "GuiMenuButtonProfile";
visible = "0";
active = "0";
tooltipProfile = "GuiToolTipProfile";
internalName = "button3";
class = "MenuInputButton";
hidden = "1";
};
new GuiIconButtonCtrl() {
BitmapAsset = "UI:Keyboard_Black_Return_image";
sizeIconToButton = "1";
makeIconSquare = "1";
textLocation = "Right";
position = "443 0";
extent = "140 40";
profile = "GuiMenuButtonProfile";
visible = "0";
active = "0";
tooltipProfile = "GuiToolTipProfile";
internalName = "button4";
class = "MenuInputButton";
hidden = "1";
};
new GuiIconButtonCtrl() {
BitmapAsset = "UI:Keyboard_Black_Return_image";
sizeIconToButton = "1";
makeIconSquare = "1";
textLocation = "Right";
position = "587 0";
extent = "140 40";
profile = "GuiMenuButtonProfile";
visible = "0";
active = "0";
tooltipProfile = "GuiToolTipProfile";
internalName = "button5";
class = "MenuInputButton";
hidden = "1";
};
};
new GuiInputCtrl(PauseMenuInputHandler) {
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 ---