Wipwork for updating the BaseUI

Adds ability to select an actionmap for a GuiInputCtrl which will push it onto the stack, so menus can enact an action map
Update of the MainMenuGUI to fit new style and have the logic needed for KBM and gamepad navigation
Very early wipwork of OptionsMenu overhaul for new standard
This commit is contained in:
Areloch 2023-12-06 19:50:51 -06:00
parent 97de2e6b60
commit 616d974212
12 changed files with 746 additions and 492 deletions

View file

@ -1,40 +1,41 @@
//--- OBJECT WRITE BEGIN ---
$guiContent = new GuiChunkedBitmapCtrl(MainMenuGui) {
BitmapAsset = "UI:backgrounddark_image";
extent = "1024 768";
extent = "1280 720";
minExtent = "8 8";
horizSizing = "width";
vertSizing = "height";
profile = "GuiDefaultProfile";
tooltipProfile = "GuiToolTipProfile";
isContainer = "1";
superClass = "UINavigation";
canSaveDynamicFields = "0";
canSaveDynamicFields = "1";
new GuiInputCtrl(MainMenuInputHandler) {
sendAxisEvents = "0";
sendBreakEvents = "0";
ignoreMouseEvents = "1";
position = "-50 0";
extent = "2186 851";
horizSizing = "width";
vertSizing = "height";
profile = "GuiInputCtrlProfile";
tooltipProfile = "GuiToolTipProfile";
//class = "MenuInputHandler";
actionMap = MainMenuActionMap;
};
new GuiBitmapCtrl(SideBackgroundImage) {
bitmapAsset = "UI:menu_side_background_image";
color = "255 255 255 255";
wrap = "0";
position = "0 0";
BitmapAsset = "UI:menu_side_background_image";
position = "0 -48";
extent = "900 600";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "top";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiBitmapCtrl(MainMenuAppLogo) {
BitmapAsset = "UI:Torque_3D_logo_image";
position = "550 30";
position = "462 30";
extent = "360 100";
horizSizing = "left";
horizSizing = "center";
profile = "GuiDefaultProfile";
tooltipProfile = "GuiToolTipProfile";
canSaveDynamicFields = "1";
@ -46,98 +47,95 @@ $guiContent = new GuiChunkedBitmapCtrl(MainMenuGui) {
useModifiers = "0";
useStates = "1";
};
new GuiControl(MainMenuButtonHolder) {
position = "143 711";
extent = "736 40";
horizSizing = "center";
new GuiPanel(MainMenuButtonPanel) {
position = "0 683";
extent = "1281 40";
horizSizing = "width";
vertSizing = "top";
profile = "GuiMenuPanelProfile";
tooltipProfile = "GuiToolTipProfile";
new GuiIconButtonCtrl(MainMenuGoButton) {
BitmapAsset = "UI:Keyboard_Black_Return_image";
sizeIconToButton = "1";
makeIconSquare = "1";
textLocation = "Center";
text = "Go";
position = "1115 0";
extent = "140 40";
horizSizing = "left";
vertSizing = "center";
profile = "GuiMenuButtonProfile";
command = "activateSelected();";
tooltipProfile = "GuiToolTipProfile";
};
};
new GuiStackControl(MainMenuButtonList) {
padding = "5";
dynamicSize = "0";
position = "440 185";
extent = "400 322";
horizSizing = "center";
vertSizing = "center";
profile = "GuiDefaultProfile";
tooltipProfile = "GuiToolTipProfile";
isContainer = "1";
class = "MenuInputButtonContainer";
superClass = "MenuList";
new GuiIconButtonCtrl() {
BitmapAsset = "UI:Keyboard_Black_Return_image";
sizeIconToButton = "1";
makeIconSquare = "1";
textLocation = "Right";
text = "Go";
position = "11 0";
extent = "140 40";
new GuiButtonCtrl(MainMenuSinglePlayerBtn) {
text = "Single Player";
extent = "400 40";
profile = "GuiMenuButtonProfile";
command = "MainMenuButtonList.activate();";
command = "openSinglePlayerMenu();";
tooltipProfile = "GuiToolTipProfile";
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";
new GuiButtonCtrl(MainMenuCreateSrvrBtn) {
text = "Create Server";
position = "0 45";
extent = "400 40";
profile = "GuiMenuButtonProfile";
command = "MainMenuButtonList.activate();";
command = "openMultiPlayerMenu();";
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";
new GuiButtonCtrl(MainMenuJoinSrvrBtn) {
text = "Join Server";
position = "0 90";
extent = "400 40";
profile = "GuiMenuButtonProfile";
command = "MainMenuButtonList.activate();";
command = "openJoinServerMenu();";
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";
new GuiButtonCtrl(MainMenuOptionBtn) {
text = "Options";
position = "0 135";
extent = "400 40";
profile = "GuiMenuButtonProfile";
command = "MainMenuButtonList.activate();";
command = "Canvas.pushDialog(OptionsMenu);";
tooltipProfile = "GuiToolTipProfile";
};
new GuiButtonCtrl(MainMenuWorldEditBtn) {
text = "Open World Editor (F11)";
position = "0 180";
extent = "400 40";
profile = "GuiMenuButtonProfile";
command = "openWorldEditorBtn();";
tooltipProfile = "GuiToolTipProfile";
};
new GuiButtonCtrl(MainMenuGuiEditBtn) {
text = "Open GUI Editor (F10)";
position = "0 225";
extent = "400 40";
profile = "GuiMenuButtonProfile";
command = "openGUIEditorBtn();";
tooltipProfile = "GuiToolTipProfile";
};
new GuiButtonCtrl(MainMenuExitBtn) {
text = "Exit";
position = "0 270";
extent = "400 40";
profile = "GuiMenuButtonProfile";
command = "quit();";
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";
};
};
new GuiInputCtrl(MainMenuInputHandler) {
sendAxisEvents = "1";
sendBreakEvents = "1";
ignoreMouseEvents = "1";
position = "-50 0";
extent = "10 10";
horizSizing = "width";
vertSizing = "height";
profile = "GuiInputCtrlProfile";
tooltipProfile = "GuiToolTipProfile";
class = "MenuInputHandler";
};
};
//--- OBJECT WRITE END ---