aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Client
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-08-31 23:14:58 +0100
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-08-31 23:14:58 +0100
commit9a96d0bff56f1969c68bb52a2f33296095bdc67d (patch)
tree4175928e488632705692e3cccafa1a38dd854615 /Northstar.Client
parent27bd240871b7c0f2f49fef137718b2e3c208e3b4 (diff)
downloadNorthstarMods-9a96d0bff56f1969c68bb52a2f33296095bdc67d.tar.gz
NorthstarMods-9a96d0bff56f1969c68bb52a2f33296095bdc67d.zip
move to new mod format
Diffstat (limited to 'Northstar.Client')
-rw-r--r--Northstar.Client/mod.json57
-rw-r--r--Northstar.Client/mod/resource/northstar_client_localisation_english.txtbin0 -> 5866 bytes
-rw-r--r--Northstar.Client/mod/resource/ui/menus/connect_password.menu (renamed from Northstar.Client/resource/ui/menus/modlist.menu)71
-rw-r--r--Northstar.Client/mod/resource/ui/menus/custom_match_settings.menu2203
-rw-r--r--Northstar.Client/mod/resource/ui/menus/custom_match_settings_categories.menu752
-rw-r--r--Northstar.Client/mod/resource/ui/menus/modlist.menu255
-rw-r--r--Northstar.Client/mod/resource/ui/menus/server_browser.menu338
-rw-r--r--Northstar.Client/mod/scripts/vscripts/ui/menu_lobby.nut (renamed from Northstar.Client/scripts/vscripts/ui/menu_lobby.nut)0
-rw-r--r--Northstar.Client/mod/scripts/vscripts/ui/menu_map_select.nut (renamed from Northstar.Client/scripts/vscripts/ui/menu_map_select.nut)0
-rw-r--r--Northstar.Client/mod/scripts/vscripts/ui/menu_match_settings.nut (renamed from Northstar.Client/scripts/vscripts/ui/menu_match_settings.nut)0
-rw-r--r--Northstar.Client/mod/scripts/vscripts/ui/menu_mode_select.nut (renamed from Northstar.Client/scripts/vscripts/ui/menu_mode_select.nut)9
-rw-r--r--Northstar.Client/mod/scripts/vscripts/ui/menu_ns_connect_password.nut30
-rw-r--r--Northstar.Client/mod/scripts/vscripts/ui/menu_ns_custom_match_settings.nut140
-rw-r--r--Northstar.Client/mod/scripts/vscripts/ui/menu_ns_custom_match_settings_categories.nut68
-rw-r--r--Northstar.Client/mod/scripts/vscripts/ui/menu_ns_modmenu.nut108
-rw-r--r--Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut198
-rw-r--r--Northstar.Client/mod/scripts/vscripts/ui/menu_private_match.nut (renamed from Northstar.Client/scripts/vscripts/ui/menu_private_match.nut)29
-rw-r--r--Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut (renamed from Northstar.Client/scripts/vscripts/ui/panel_mainmenu.nut)20
-rw-r--r--Northstar.Client/mod/scripts/vscripts/ui/ui_utility.gnut (renamed from Northstar.Client/scripts/vscripts/ui/ui_utility.gnut)0
-rw-r--r--Northstar.Client/scripts/vscripts/ui/_menus.nut2010
-rw-r--r--Northstar.Client/scripts/vscripts/ui/menu_main.nut608
21 files changed, 4235 insertions, 2661 deletions
diff --git a/Northstar.Client/mod.json b/Northstar.Client/mod.json
index f9a6fea5b..1edf2ba1c 100644
--- a/Northstar.Client/mod.json
+++ b/Northstar.Client/mod.json
@@ -1,15 +1,54 @@
{
- "ApiId" : "Northstar.Client",
"Name" : "Northstar.Client",
"Description" : "Various ui and client changes to fix bugs and add better support for mods",
- "Authors" : [
- "BobTheBob"
- ],
- "Contacts" : [
- "BobTheBob#1150"
- ],
- "Version" : "0.1",
- "CustomScripts": [
+ "LoadPriority": 0,
+
+ // ui inits need to happen before so our init callbacks get called
+ "Scripts": [
+ {
+ "Path": "ui/menu_ns_modmenu.nut",
+ "RunOn": "UI",
+ "UICallback": {
+ "Before": "AddNorthstarModMenu",
+ "After": "AddNorthstarModMenu_MainMenuFooter" // need to do this after, so we add footer after mainmenu init
+ }
+ },
+
+ {
+ "Path": "ui/menu_ns_serverbrowser.nut",
+ "RunOn": "UI",
+ "UICallback": {
+ "Before": "AddNorthstarServerBrowserMenu"
+ }
+ },
+
+ {
+ "Path": "ui/menu_ns_connect_password.nut",
+ "RunOn": "UI",
+ "UICallback": {
+ "Before": "AddNorthstarConnectWithPasswordMenu"
+ }
+ },
+
+ {
+ "Path": "ui/menu_ns_custom_match_settings_categories.nut",
+ "RunOn": "UI",
+ "UICallback": {
+ "Before": "AddNorthstarCustomMatchSettingsCategoryMenu"
+ }
+ },
+
+ {
+ "Path": "ui/menu_ns_custom_match_settings.nut",
+ "RunOn": "UI",
+ "UICallback": {
+ "Before": "AddNorthstarCustomMatchSettingsMenu"
+ }
+ }
+ ],
+
+ "Localisation": [
+ "resource/northstar_client_localisation_%language%.txt"
]
} \ No newline at end of file
diff --git a/Northstar.Client/mod/resource/northstar_client_localisation_english.txt b/Northstar.Client/mod/resource/northstar_client_localisation_english.txt
new file mode 100644
index 000000000..1fc54f2bd
--- /dev/null
+++ b/Northstar.Client/mod/resource/northstar_client_localisation_english.txt
Binary files differ
diff --git a/Northstar.Client/resource/ui/menus/modlist.menu b/Northstar.Client/mod/resource/ui/menus/connect_password.menu
index 289ff4848..b5e12ad25 100644
--- a/Northstar.Client/resource/ui/menus/modlist.menu
+++ b/Northstar.Client/mod/resource/ui/menus/connect_password.menu
@@ -26,7 +26,7 @@ resource/ui/menus/mods_browse.menu
{
ControlName Label
InheritProperties MenuTitle
- labelText "Configure"
+ labelText "#MENU_TITLE_CONNECT_PASSWORD"
}
ImgTopBar
@@ -34,7 +34,16 @@ resource/ui/menus/mods_browse.menu
ControlName ImagePanel
InheritProperties MenuTopBar
}
+
+ ButtonRowAnchor
+ {
+ ControlName Label
+ labelText ""
+ xpos 120
+ ypos 160
+ }
+
MatchmakingStatus
{
ControlName CNestedPanel
@@ -48,36 +57,44 @@ resource/ui/menus/mods_browse.menu
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- LblMenuItemDescription
+ EnterPasswordBox
{
- ControlName Label
- InheritProperties OptionMenuTooltip
- classname MenuItemDescriptionClass
- xpos 975
- ypos 168
- }
-
-////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-
- SwitchCommunityPanel
- {
- ControlName CNestedPanel
- wide f0
- tall f0
+ ControlName TextEntry
+ wide 700
+ tall 53
visible 1
- controlSettingsFile "resource/ui/menus/panels/switch_configure_mods.res"
+ enabled 1
+ textHidden 1
+ editable 1
+ maxchars 32
+ NumericInputOnly 0
+ textAlignment "east"
+ font DefaultBold_53
+ keyboardTitle "#CONNECT_WITH_PASSWORD"
+ keyboardDescription "#ENTER_PASSWORD"
+ allowRightClickMenu 1
+ allowSpecialCharacters 0
+ unicode 0
+ paintborder 0
+
+ pin_to_sibling ButtonRowAnchor
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
}
-
- BtnModOptions
- {
- xpos 120
- ypos 160
- ControlName RuiButton
- InheritProperties RuiSmallButton
- visible 1
- }
+
+ ConnectButton
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ wide 200
+ classname ModButton
+ scriptID 0
+ visible 1
+ pin_to_sibling EnterPasswordBox
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/Northstar.Client/mod/resource/ui/menus/custom_match_settings.menu b/Northstar.Client/mod/resource/ui/menus/custom_match_settings.menu
new file mode 100644
index 000000000..f8ed75b4e
--- /dev/null
+++ b/Northstar.Client/mod/resource/ui/menus/custom_match_settings.menu
@@ -0,0 +1,2203 @@
+resource/ui/menus/mods_browse.menu
+{
+ menu
+ {
+ ControlName Frame
+ xpos 0
+ ypos 0
+ zpos 3
+ wide f0
+ tall f0
+ autoResize 0
+ visible 1
+ enabled 1
+ pinCorner 0
+ PaintBackgroundType 0
+ infocus_bgcolor_override "0 0 0 0"
+ outoffocus_bgcolor_override "0 0 0 0"
+
+ Vignette
+ {
+ ControlName ImagePanel
+ InheritProperties MenuVignette
+ }
+
+ Title
+ {
+ ControlName Label
+ InheritProperties MenuTitle
+ labelText "#MENU_MATCH_SETTINGS"
+ }
+
+ ImgTopBar
+ {
+ ControlName ImagePanel
+ InheritProperties MenuTopBar
+ }
+
+ ButtonRowAnchor
+ {
+ ControlName Label
+ labelText ""
+
+ xpos 120
+ ypos 160
+ }
+
+ //test
+ //{
+ // ControlName ListPanel
+ // xpos "200"
+ // ypos "200"
+ // zpos 999
+ // wide "312"
+ // tall "340"
+ // autoResize "0"
+ // pinCorner "0"
+ // visible "1"
+ // enabled "1"
+ // tabPosition "0"
+ //}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+ //TextEntrySldFOV
+ //{
+ // ControlName TextEntry
+ // xpos 8
+ // zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ // wide 50
+ // tall 30
+ // visible 1
+ // enabled 1
+ // textHidden 0
+ // editable 1
+ // maxchars 3
+ // NumericInputOnly 1
+ // font Default_21
+ // allowRightClickMenu 0
+ // allowSpecialCharacters 0
+ // unicode 0
+ //
+ // pin_to_sibling SldFOV
+ // pin_corner_to_sibling LEFT
+ // pin_to_sibling_corner RIGHT
+ //}
+
+ BtnSetting0
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 0
+ xpos 96
+ ypos 177
+ tabPosition 1
+ navUp BtnSetting0
+ navDown BtnSetting1
+ }
+
+ TextEntrySetting0
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 0
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting0
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting47
+ navDown BtnSetting1
+ }
+
+ BtnSetting1
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 1
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting0
+ navDown BtnSetting2
+
+ pin_to_sibling BtnSetting0
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting1
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 1
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting1
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting0
+ navDown BtnSetting2
+ }
+
+ BtnSetting2
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 2
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting1
+ navDown BtnSetting3
+
+ pin_to_sibling BtnSetting1
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting2
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 2
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting2
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting1
+ navDown BtnSetting3
+ }
+
+ BtnSetting3
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 3
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting2
+ navDown BtnSetting4
+
+ pin_to_sibling BtnSetting2
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting3
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 3
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting3
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting2
+ navDown BtnSetting4
+ }
+
+ BtnSetting4
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 4
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting3
+ navDown BtnSetting5
+
+ pin_to_sibling BtnSetting3
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting4
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 4
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting4
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting3
+ navDown BtnSetting5
+ }
+
+ BtnSetting5
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 5
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting4
+ navDown BtnSetting6
+
+ pin_to_sibling BtnSetting4
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting5
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 5
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting5
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting4
+ navDown BtnSetting6
+ }
+
+ BtnSetting6
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 6
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting5
+ navDown BtnSetting7
+
+ pin_to_sibling BtnSetting5
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting6
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 6
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting6
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting5
+ navDown BtnSetting7
+ }
+
+ BtnSetting7
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 7
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting6
+ navDown BtnSetting8
+
+ pin_to_sibling BtnSetting6
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting7
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 7
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting7
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting6
+ navDown BtnSetting8
+ }
+
+ BtnSetting8
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 8
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting7
+ navDown BtnSetting9
+
+ pin_to_sibling BtnSetting7
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting8
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 8
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting8
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting7
+ navDown BtnSetting9
+ }
+
+ BtnSetting9
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 9
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting8
+ navDown BtnSetting10
+
+ pin_to_sibling BtnSetting8
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting9
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 9
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting9
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting8
+ navDown BtnSetting10
+ }
+
+ BtnSetting10
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 10
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting9
+ navDown BtnSetting11
+
+ pin_to_sibling BtnSetting9
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting10
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 10
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting10
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting9
+ navDown BtnSetting11
+ }
+
+ BtnSetting11
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 11
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting10
+ navDown BtnSetting12
+
+ pin_to_sibling BtnSetting10
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting11
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 11
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting11
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting10
+ navDown BtnSetting12
+ }
+
+ BtnSetting12
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 12
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting11
+ navDown BtnSetting13
+
+ pin_to_sibling BtnSetting11
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting12
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 12
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting12
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting11
+ navDown BtnSetting13
+ }
+
+ BtnSetting13
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 13
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting12
+ navDown BtnSetting14
+
+ pin_to_sibling BtnSetting12
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting13
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 13
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting13
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting12
+ navDown BtnSetting14
+ }
+
+ BtnSetting14
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 14
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting13
+ navDown BtnSetting15
+
+ pin_to_sibling BtnSetting13
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting14
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 14
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting14
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting13
+ navDown BtnSetting15
+ }
+
+ BtnSetting15
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 15
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting14
+ navDown BtnSetting16
+
+ pin_to_sibling BtnSetting14
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting15
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 15
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting15
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting14
+ navDown BtnSetting16
+ }
+
+ BtnSetting16
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 16
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting15
+ navDown BtnSetting17
+
+ pin_to_sibling BtnSetting0
+ pin_corner_to_sibling LEFT
+ pin_to_sibling_corner RIGHT
+ }
+
+ TextEntrySetting16
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 16
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting16
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting15
+ navDown BtnSetting17
+ }
+
+ BtnSetting17
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 17
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting16
+ navDown BtnSetting18
+
+ pin_to_sibling BtnSetting16
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting17
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 17
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting17
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting16
+ navDown BtnSetting18
+ }
+
+ BtnSetting18
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 18
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting17
+ navDown BtnSetting19
+
+ pin_to_sibling BtnSetting17
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting18
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 18
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting18
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting17
+ navDown BtnSetting19
+ }
+
+ BtnSetting19
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 19
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting18
+ navDown BtnSetting20
+
+ pin_to_sibling BtnSetting18
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting19
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 19
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting19
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting18
+ navDown BtnSetting20
+ }
+
+ BtnSetting20
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 20
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting19
+ navDown BtnSetting21
+
+ pin_to_sibling BtnSetting19
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting20
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 20
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting20
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting19
+ navDown BtnSetting21
+ }
+
+ BtnSetting21
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 21
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting20
+ navDown BtnSetting22
+
+ pin_to_sibling BtnSetting20
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting21
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 21
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting21
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting20
+ navDown BtnSetting22
+ }
+
+ BtnSetting22
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 22
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting21
+ navDown BtnSetting23
+
+ pin_to_sibling BtnSetting21
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting22
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 22
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting22
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting21
+ navDown BtnSetting23
+ }
+
+ BtnSetting23
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 23
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting22
+ navDown BtnSetting24
+
+ pin_to_sibling BtnSetting22
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting23
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 23
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting23
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting22
+ navDown BtnSetting24
+ }
+
+ BtnSetting24
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 24
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting23
+ navDown BtnSetting25
+
+ pin_to_sibling BtnSetting23
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting24
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 24
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting24
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting23
+ navDown BtnSetting25
+ }
+
+ BtnSetting25
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 25
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting24
+ navDown BtnSetting26
+
+ pin_to_sibling BtnSetting24
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting25
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 25
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting25
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting24
+ navDown BtnSetting26
+ }
+
+ BtnSetting26
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 26
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting25
+ navDown BtnSetting27
+
+ pin_to_sibling BtnSetting25
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting26
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 26
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting26
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting25
+ navDown BtnSetting27
+ }
+
+ BtnSetting27
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 27
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting26
+ navDown BtnSetting28
+
+ pin_to_sibling BtnSetting26
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting27
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 27
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting27
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting26
+ navDown BtnSetting28
+ }
+
+ BtnSetting28
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 28
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting27
+ navDown BtnSetting29
+
+ pin_to_sibling BtnSetting27
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting28
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 28
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting28
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting27
+ navDown BtnSetting29
+ }
+
+ BtnSetting29
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 29
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting28
+ navDown BtnSetting30
+
+ pin_to_sibling BtnSetting28
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting29
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 29
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting29
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting28
+ navDown BtnSetting30
+ }
+
+ BtnSetting30
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 30
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting29
+ navDown BtnSetting31
+
+ pin_to_sibling BtnSetting29
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting30
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 30
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting30
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting29
+ navDown BtnSetting31
+ }
+
+ BtnSetting31
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 31
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting30
+ navDown BtnSetting32
+
+ pin_to_sibling BtnSetting30
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting31
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 31
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting31
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting30
+ navDown BtnSetting32
+ }
+
+ BtnSetting32
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 32
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting31
+ navDown BtnSetting33
+
+ pin_to_sibling BtnSetting16
+ pin_corner_to_sibling LEFT
+ pin_to_sibling_corner RIGHT
+ }
+
+ TextEntrySetting32
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 32
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting32
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting31
+ navDown BtnSetting33
+ }
+
+ BtnSetting33
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 33
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting32
+ navDown BtnSetting34
+
+ pin_to_sibling BtnSetting32
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting33
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 33
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting33
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting32
+ navDown BtnSetting34
+ }
+
+ BtnSetting34
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 34
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting33
+ navDown BtnSetting35
+
+ pin_to_sibling BtnSetting33
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting34
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 34
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting34
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting33
+ navDown BtnSetting35
+ }
+
+ BtnSetting35
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 35
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting34
+ navDown BtnSetting36
+
+ pin_to_sibling BtnSetting34
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting35
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 35
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting35
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting34
+ navDown BtnSetting36
+ }
+
+ BtnSetting36
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 36
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting35
+ navDown BtnSetting37
+
+ pin_to_sibling BtnSetting35
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting36
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 36
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting36
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting35
+ navDown BtnSetting37
+ }
+
+ BtnSetting37
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 37
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting36
+ navDown BtnSetting38
+
+ pin_to_sibling BtnSetting36
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting37
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 37
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting37
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting36
+ navDown BtnSetting38
+ }
+
+ BtnSetting38
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 38
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting37
+ navDown BtnSetting39
+
+ pin_to_sibling BtnSetting37
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting38
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 38
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting38
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting37
+ navDown BtnSetting39
+ }
+
+ BtnSetting39
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 39
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting38
+ navDown BtnSetting40
+
+ pin_to_sibling BtnSetting38
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting39
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 39
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting39
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting38
+ navDown BtnSetting40
+ }
+
+ BtnSetting40
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 40
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting39
+ navDown BtnSetting41
+
+ pin_to_sibling BtnSetting39
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting40
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 40
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting40
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting39
+ navDown BtnSetting41
+ }
+
+ BtnSetting41
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 41
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting40
+ navDown BtnSetting42
+
+ pin_to_sibling BtnSetting40
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting41
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 41
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting41
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting40
+ navDown BtnSetting42
+ }
+
+ BtnSetting42
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 42
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting41
+ navDown BtnSetting43
+
+ pin_to_sibling BtnSetting41
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting42
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 42
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting42
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting41
+ navDown BtnSetting43
+ }
+
+ BtnSetting43
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 43
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting42
+ navDown BtnSetting44
+
+ pin_to_sibling BtnSetting42
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting43
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 43
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting43
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting42
+ navDown BtnSetting44
+ }
+
+ BtnSetting44
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 44
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting43
+ navDown BtnSetting45
+
+ pin_to_sibling BtnSetting43
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting44
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 44
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting44
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting43
+ navDown BtnSetting45
+ }
+
+ BtnSetting45
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 45
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting44
+ navDown BtnSetting46
+
+ pin_to_sibling BtnSetting44
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting45
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 45
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting45
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting44
+ navDown BtnSetting46
+ }
+
+ BtnSetting46
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 46
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting45
+ navDown BtnSetting47
+
+ pin_to_sibling BtnSetting45
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting46
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 46
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting46
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting45
+ navDown BtnSetting47
+ }
+
+ BtnSetting47
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingButton
+ style DialogListButton
+ scriptID 47
+ //xpos 96
+ //ypos 177
+ tabPosition 1
+ navUp BtnSetting46
+ navDown BtnSetting0
+
+ pin_to_sibling BtnSetting46
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ TextEntrySetting47
+ {
+ ControlName TextEntry
+ classname MatchSettingTextEntry
+ xpos "-35"
+ ypos "-3"
+ zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
+ wide 175
+ tall 30
+ scriptID 47
+ textHidden 0
+ editable 1
+ //NumericInputOnly 1
+ font Default_21
+ allowRightClickMenu 0
+ allowSpecialCharacters 0
+ unicode 0
+
+ pin_to_sibling BtnSetting47
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ navUp BtnSetting46
+ navDown BtnSetting0
+ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+ FooterButtons
+ {
+ ControlName CNestedPanel
+ InheritProperties FooterButtons
+ }
+ }
+}
diff --git a/Northstar.Client/mod/resource/ui/menus/custom_match_settings_categories.menu b/Northstar.Client/mod/resource/ui/menus/custom_match_settings_categories.menu
new file mode 100644
index 000000000..b0d7d002b
--- /dev/null
+++ b/Northstar.Client/mod/resource/ui/menus/custom_match_settings_categories.menu
@@ -0,0 +1,752 @@
+resource/ui/menus/mods_browse.menu
+{
+ menu
+ {
+ ControlName Frame
+ xpos 0
+ ypos 0
+ zpos 3
+ wide f0
+ tall f0
+ autoResize 0
+ visible 1
+ enabled 1
+ pinCorner 0
+ PaintBackgroundType 0
+ infocus_bgcolor_override "0 0 0 0"
+ outoffocus_bgcolor_override "0 0 0 0"
+
+ Vignette
+ {
+ ControlName ImagePanel
+ InheritProperties MenuVignette
+ }
+
+ Title
+ {
+ ControlName Label
+ InheritProperties MenuTitle
+ labelText "#MENU_MATCH_SETTINGS"
+ }
+
+ ImgTopBar
+ {
+ ControlName ImagePanel
+ InheritProperties MenuTopBar
+ }
+
+ ButtonRowAnchor
+ {
+ ControlName Label
+ labelText ""
+
+ xpos 120
+ ypos 160
+ }
+
+ //test
+ //{
+ // ControlName ListPanel
+ // xpos "200"
+ // ypos "200"
+ // zpos 999
+ // wide "312"
+ // tall "340"
+ // autoResize "0"
+ // pinCorner "0"
+ // visible "1"
+ // enabled "1"
+ // tabPosition "0"
+ //}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+ BtnDev0
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 0
+ xpos 96
+ ypos 177
+ tabPosition 1
+ navUp BtnDev47
+ navDown BtnDev1
+ navRight BtnDev15
+ navLeft BtnDev31
+ }
+ BtnDev1
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 1
+ pin_to_sibling BtnDev0
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev0
+ navDown BtnDev2
+ navRight BtnDev16
+ navLeft BtnDev32
+ }
+ BtnDev2
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 2
+ pin_to_sibling BtnDev1
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev1
+ navDown BtnDev3
+ navRight BtnDev17
+ navLeft BtnDev33
+ }
+ BtnDev3
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 3
+ pin_to_sibling BtnDev2
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev2
+ navDown BtnDev4
+ navRight BtnDev18
+ navLeft BtnDev34
+ }
+ BtnDev4
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 4
+ pin_to_sibling BtnDev3
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev3
+ navDown BtnDev5
+ navRight BtnDev19
+ navLeft BtnDev35
+ }
+ BtnDev5
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 5
+ pin_to_sibling BtnDev4
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev4
+ navDown BtnDev6
+ navRight BtnDev20
+ navLeft BtnDev36
+ }
+ BtnDev6
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 6
+ pin_to_sibling BtnDev5
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev5
+ navDown BtnDev7
+ navRight BtnDev21
+ navLeft BtnDev37
+ }
+ BtnDev7
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 7
+ pin_to_sibling BtnDev6
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev6
+ navDown BtnDev8
+ navRight BtnDev22
+ navLeft BtnDev38
+ }
+ BtnDev8
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 8
+ pin_to_sibling BtnDev7
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev7
+ navDown BtnDev9
+ navRight BtnDev23
+ navLeft BtnDev39
+ }
+ BtnDev9
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 9
+ pin_to_sibling BtnDev8
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev8
+ navDown BtnDev10
+ navRight BtnDev24
+ navLeft BtnDev40
+ }
+ BtnDev10
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 10
+ pin_to_sibling BtnDev9
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev9
+ navDown BtnDev11
+ navRight BtnDev25
+ navLeft BtnDev41
+ }
+ BtnDev11
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 11
+ pin_to_sibling BtnDev10
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev10
+ navDown BtnDev12
+ navRight BtnDev26
+ navLeft BtnDev42
+ }
+ BtnDev12
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 12
+ pin_to_sibling BtnDev11
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev11
+ navDown BtnDev13
+ navRight BtnDev27
+ navLeft BtnDev43
+ }
+ BtnDev13
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 13
+ pin_to_sibling BtnDev12
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev12
+ navDown BtnDev14
+ navRight BtnDev28
+ navLeft BtnDev44
+ }
+ BtnDev14
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 14
+ pin_to_sibling BtnDev13
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev13
+ navDown BtnDev47
+ navRight BtnDev29
+ navLeft BtnDev45
+ }
+
+//////////////////////////////////////
+
+ BtnDev15
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 15
+ pin_to_sibling BtnDev0
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner TOP_RIGHT
+ navUp BtnDev30
+ navDown BtnDev16
+ navRight BtnDev31
+ navLeft BtnDev0
+ }
+ BtnDev16
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 16
+ pin_to_sibling BtnDev15
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev15
+ navDown BtnDev17
+ navRight BtnDev32
+ navLeft BtnDev1
+ }
+ BtnDev17
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 17
+ pin_to_sibling BtnDev16
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev16
+ navDown BtnDev18
+ navRight BtnDev33
+ navLeft BtnDev2
+ }
+ BtnDev18
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 18
+ pin_to_sibling BtnDev17
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev17
+ navDown BtnDev19
+ navRight BtnDev34
+ navLeft BtnDev3
+ }
+ BtnDev19
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 19
+ pin_to_sibling BtnDev18
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev18
+ navDown BtnDev20
+ navRight BtnDev35
+ navLeft BtnDev4
+ }
+ BtnDev20
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 20
+ pin_to_sibling BtnDev19
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev19
+ navDown BtnDev21
+ navRight BtnDev36
+ navLeft BtnDev5
+ }
+ BtnDev21
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 21
+ pin_to_sibling BtnDev20
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev20
+ navDown BtnDev22
+ navRight BtnDev37
+ navLeft BtnDev6
+ }
+ BtnDev22
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 22
+ pin_to_sibling BtnDev21
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev21
+ navDown BtnDev23
+ navRight BtnDev38
+ navLeft BtnDev7
+ }
+ BtnDev23
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 23
+ pin_to_sibling BtnDev22
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev22
+ navDown BtnDev24
+ navRight BtnDev39
+ navLeft BtnDev8
+ }
+ BtnDev24
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 24
+ pin_to_sibling BtnDev23
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev23
+ navDown BtnDev25
+ navRight BtnDev40
+ navLeft BtnDev9
+ }
+ BtnDev25
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 25
+ pin_to_sibling BtnDev24
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev24
+ navDown BtnDev26
+ navRight BtnDev41
+ navLeft BtnDev10
+ }
+ BtnDev26
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 26
+ pin_to_sibling BtnDev25
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev25
+ navDown BtnDev27
+ navRight BtnDev42
+ navLeft BtnDev11
+ }
+ BtnDev27
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 27
+ pin_to_sibling BtnDev26
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev26
+ navDown BtnDev28
+ navRight BtnDev43
+ navLeft BtnDev12
+ }
+ BtnDev28
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 28
+ pin_to_sibling BtnDev27
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev27
+ navDown BtnDev29
+ navRight BtnDev44
+ navLeft BtnDev13
+ }
+ BtnDev29
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 29
+ pin_to_sibling BtnDev28
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev28
+ navDown BtnDev30
+ navRight BtnDev45
+ navLeft BtnDev14
+ }
+ BtnDev30
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 30
+ pin_to_sibling BtnDev29
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev29
+ navDown BtnDev15
+ navRight BtnDev46
+ navLeft BtnDev47
+ }
+
+ BtnDev47
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 47
+ pin_to_sibling BtnDev14
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev14
+ navDown BtnDev0
+ navRight BtnDev30
+ navLeft BtnDev46
+ }
+
+//////////////////////////////////////
+
+ BtnDev31
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 31
+ pin_to_sibling BtnDev15
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner TOP_RIGHT
+ navUp BtnDev46
+ navDown BtnDev32
+ navRight BtnDev0
+ navLeft BtnDev15
+ }
+ BtnDev32
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 32
+ pin_to_sibling BtnDev31
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev31
+ navDown BtnDev33
+ navRight BtnDev1
+ navLeft BtnDev16
+ }
+ BtnDev33
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 33
+ pin_to_sibling BtnDev32
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev32
+ navDown BtnDev34
+ navRight BtnDev2
+ navLeft BtnDev17
+ }
+ BtnDev34
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 34
+ pin_to_sibling BtnDev33
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev33
+ navDown BtnDev35
+ navRight BtnDev3
+ navLeft BtnDev18
+ }
+ BtnDev35
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 35
+ pin_to_sibling BtnDev34
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev34
+ navDown BtnDev36
+ navRight BtnDev4
+ navLeft BtnDev19
+ }
+ BtnDev36
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 36
+ pin_to_sibling BtnDev35
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev35
+ navDown BtnDev37
+ navRight BtnDev5
+ navLeft BtnDev20
+ }
+ BtnDev37
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 37
+ pin_to_sibling BtnDev36
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev36
+ navDown BtnDev38
+ navRight BtnDev6
+ navLeft BtnDev21
+ }
+ BtnDev38
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 38
+ pin_to_sibling BtnDev37
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev37
+ navDown BtnDev39
+ navRight BtnDev7
+ navLeft BtnDev22
+ }
+ BtnDev39
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 39
+ pin_to_sibling BtnDev38
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev38
+ navDown BtnDev40
+ navRight BtnDev8
+ navLeft BtnDev23
+ }
+ BtnDev40
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 40
+ pin_to_sibling BtnDev39
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev39
+ navDown BtnDev41
+ navRight BtnDev9
+ navLeft BtnDev24
+ }
+ BtnDev41
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 41
+ pin_to_sibling BtnDev40
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev40
+ navDown BtnDev42
+ navRight BtnDev10
+ navLeft BtnDev25
+ }
+ BtnDev42
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 42
+ pin_to_sibling BtnDev41
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev41
+ navDown BtnDev43
+ navRight BtnDev11
+ navLeft BtnDev26
+ }
+ BtnDev43
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 43
+ pin_to_sibling BtnDev42
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev42
+ navDown BtnDev44
+ navRight BtnDev12
+ navLeft BtnDev27
+ }
+ BtnDev44
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 44
+ pin_to_sibling BtnDev43
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev43
+ navDown BtnDev45
+ navRight BtnDev13
+ navLeft BtnDev28
+ }
+ BtnDev45
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 45
+ pin_to_sibling BtnDev44
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev44
+ navDown BtnDev46
+ navRight BtnDev14
+ navLeft BtnDev29
+ }
+ BtnDev46
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname MatchSettingCategoryButton
+ scriptID 46
+ pin_to_sibling BtnDev45
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnDev45
+ navDown BtnDev31
+ navRight BtnDev47
+ navLeft BtnDev30
+ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+ FooterButtons
+ {
+ ControlName CNestedPanel
+ InheritProperties FooterButtons
+ }
+ }
+}
diff --git a/Northstar.Client/mod/resource/ui/menus/modlist.menu b/Northstar.Client/mod/resource/ui/menus/modlist.menu
new file mode 100644
index 000000000..682f643ec
--- /dev/null
+++ b/Northstar.Client/mod/resource/ui/menus/modlist.menu
@@ -0,0 +1,255 @@
+resource/ui/menus/mods_browse.menu
+{
+ menu
+ {
+ ControlName Frame
+ xpos 0
+ ypos 0
+ zpos 3
+ wide f0
+ tall f0
+ autoResize 0
+ visible 1
+ enabled 1
+ pinCorner 0
+ PaintBackgroundType 0
+ infocus_bgcolor_override "0 0 0 0"
+ outoffocus_bgcolor_override "0 0 0 0"
+
+ Vignette
+ {
+ ControlName ImagePanel
+ InheritProperties MenuVignette
+ }
+
+ Title
+ {
+ ControlName Label
+ InheritProperties MenuTitle
+ labelText "#MENU_TITLE_MODS"
+ }
+
+ ImgTopBar
+ {
+ ControlName ImagePanel
+ InheritProperties MenuTopBar
+ }
+
+ ButtonRowAnchor
+ {
+ ControlName Label
+ labelText ""
+
+ xpos 120
+ ypos 160
+ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+ BtnMod1
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname ModButton
+ scriptID 0
+ navUp BtnMod15
+ navDown BtnMod2
+
+ pin_to_sibling ButtonRowAnchor
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner TOP_LEFT
+ }
+ BtnMod2
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname ModButton
+ scriptID 1
+ pin_to_sibling BtnMod1
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnMod1
+ navDown BtnMod3
+ }
+ BtnMod3
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname ModButton
+ scriptID 2
+ pin_to_sibling BtnMod2
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnMod2
+ navDown BtnMod4
+ }
+ BtnMod4
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname ModButton
+ scriptID 3
+ pin_to_sibling BtnMod3
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ //ypos 11
+ navUp BtnMod3
+ navDown BtnMod5
+ }
+ BtnMod5
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname ModButton
+ scriptID 4
+ pin_to_sibling BtnMod4
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnMod4
+ navDown BtnMod6
+ }
+ BtnMod6
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname ModButton
+ scriptID 5
+ pin_to_sibling BtnMod5
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnMod5
+ navDown BtnMod7
+ }
+ BtnMod7
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname ModButton
+ scriptID 6
+ pin_to_sibling BtnMod6
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnMod6
+ navDown BtnMod8
+ }
+ BtnMod8
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname ModButton
+ scriptID 7
+ pin_to_sibling BtnMod7
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnMod7
+ navDown BtnMod9
+ }
+ BtnMod9
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname ModButton
+ scriptID 8
+ pin_to_sibling BtnMod8
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnMod8
+ navDown BtnMod10
+ }
+ BtnMod10
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname ModButton
+ scriptID 9
+ pin_to_sibling BtnMod9
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnMod9
+ navDown BtnMod11
+ }
+ BtnMod11
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname ModButton
+ scriptID 10
+ pin_to_sibling BtnMod10
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnMod10
+ navDown BtnMod12
+ }
+ BtnMod12
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname ModButton
+ scriptID 11
+ pin_to_sibling BtnMod11
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnMod11
+ navDown BtnMod13
+ }
+ BtnMod13
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname ModButton
+ scriptID 12
+ pin_to_sibling BtnMod12
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnMod12
+ navDown BtnMod14
+ }
+ BtnMod14
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname ModButton
+ scriptID 13
+ pin_to_sibling BtnMod13
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnMod13
+ navDown BtnMod15
+ }
+ BtnMod15
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname ModButton
+ scriptID 14
+ pin_to_sibling BtnMod14
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnMod14
+ navDown BtnMod1
+ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+ LabelDetails
+ {
+ ControlName RuiPanel
+ xpos 900
+ ypos 160
+ tall 800
+ wide 950
+ rui "ui/knowledgebase_panel.rpak"
+ wrap 1
+ visible 1
+ zpos 1
+ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+ FooterButtons
+ {
+ ControlName CNestedPanel
+ InheritProperties FooterButtons
+ }
+ }
+}
diff --git a/Northstar.Client/mod/resource/ui/menus/server_browser.menu b/Northstar.Client/mod/resource/ui/menus/server_browser.menu
new file mode 100644
index 000000000..90785e465
--- /dev/null
+++ b/Northstar.Client/mod/resource/ui/menus/server_browser.menu
@@ -0,0 +1,338 @@
+resource/ui/menus/mods_browse.menu
+{
+ menu
+ {
+ ControlName Frame
+ xpos 0
+ ypos 0
+ zpos 3
+ wide f0
+ tall f0
+ autoResize 0
+ visible 1
+ enabled 1
+ pinCorner 0
+ PaintBackgroundType 0
+ infocus_bgcolor_override "0 0 0 0"
+ outoffocus_bgcolor_override "0 0 0 0"
+
+ Vignette
+ {
+ ControlName ImagePanel
+ InheritProperties MenuVignette
+ }
+
+ Title
+ {
+ ControlName Label
+ InheritProperties MenuTitle
+ labelText "#MENU_TITLE_SERVER_BROWSER"
+ }
+
+ ImgTopBar
+ {
+ ControlName ImagePanel
+ InheritProperties MenuTopBar
+ }
+
+ ButtonRowAnchor
+ {
+ ControlName Label
+ labelText ""
+
+ xpos 120
+ ypos 160
+ }
+
+ //test
+ //{
+ // ControlName ListPanel
+ // xpos "200"
+ // ypos "200"
+ // zpos 999
+ // wide "312"
+ // tall "340"
+ // autoResize "0"
+ // pinCorner "0"
+ // visible "1"
+ // enabled "1"
+ // tabPosition "0"
+ //}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+ BtnServer1
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname ServerButton
+ scriptID 0
+ navUp BtnServer15
+ navDown BtnServer2
+
+ pin_to_sibling ButtonRowAnchor
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner TOP_LEFT
+ }
+ BtnServer2
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname ServerButton
+ scriptID 1
+ pin_to_sibling BtnServer1
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnServer1
+ navDown BtnServer3
+ }
+ BtnServer3
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname ServerButton
+ scriptID 2
+ pin_to_sibling BtnServer2
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnServer2
+ navDown BtnServer4
+ }
+ BtnServer4
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname ServerButton
+ scriptID 3
+ pin_to_sibling BtnServer3
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ //ypos 11
+ navUp BtnServer3
+ navDown BtnServer5
+ }
+ BtnServer5
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname ServerButton
+ scriptID 4
+ pin_to_sibling BtnServer4
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnServer4
+ navDown BtnServer6
+ }
+ BtnServer6
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname ServerButton
+ scriptID 5
+ pin_to_sibling BtnServer5
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnServer5
+ navDown BtnServer7
+ }
+ BtnServer7
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname ServerButton
+ scriptID 6
+ pin_to_sibling BtnServer6
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnServer6
+ navDown BtnServer8
+ }
+ BtnServer8
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname ServerButton
+ scriptID 7
+ pin_to_sibling BtnServer7
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnServer7
+ navDown BtnServer9
+ }
+ BtnServer9
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname ServerButton
+ scriptID 8
+ pin_to_sibling BtnServer8
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnServer8
+ navDown BtnServer10
+ }
+ BtnServer10
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname ServerButton
+ scriptID 9
+ pin_to_sibling BtnServer9
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnServer9
+ navDown BtnServer11
+ }
+ BtnServer11
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname ServerButton
+ scriptID 10
+ pin_to_sibling BtnServer10
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnServer10
+ navDown BtnServer12
+ }
+ BtnServer12
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname ServerButton
+ scriptID 11
+ pin_to_sibling BtnServer11
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnServer11
+ navDown BtnServer13
+ }
+ BtnServer13
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname ServerButton
+ scriptID 12
+ pin_to_sibling BtnServer12
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnServer12
+ navDown BtnServer14
+ }
+ BtnServer14
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname ServerButton
+ scriptID 13
+ pin_to_sibling BtnServer13
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnServer13
+ navDown BtnServer15
+ }
+ BtnServer15
+ {
+ ControlName RuiButton
+ InheritProperties RuiSmallButton
+ classname ServerButton
+ scriptID 14
+ pin_to_sibling BtnServer14
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ navUp BtnServer14
+ navDown BtnServer1
+ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+ LabelDetails
+ {
+ ControlName RuiPanel
+ xpos 900
+ ypos 160
+ tall 800
+ wide 950
+ rui "ui/knowledgebase_panel.rpak"
+ wrap 1
+ visible 1
+ zpos -1
+ }
+
+ NextMapImage
+ {
+ ControlName RuiPanel
+ wide 500
+ tall 288
+ visible 0
+ scaleImage 1
+
+ rui "ui/basic_menu_image.rpak"
+
+ pin_to_sibling LabelDetails
+ pin_corner_to_sibling TOP_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+ }
+ NextMapName
+ {
+ ControlName Label
+ pin_to_sibling NextMapImage
+ pin_corner_to_sibling BOTTOM_RIGHT
+ pin_to_sibling_corner BOTTOM_RIGHT
+
+ xpos -12
+ ypos 0
+ zpos 1
+
+ auto_wide_tocontents 1
+ auto_tall_tocontents 1
+ labelText ""
+ font Default_43_DropShadow
+ allcaps 1
+ fgcolor_override "255 255 255 255"
+ }
+ NextGameModeName
+ {
+ ControlName Label
+ pin_to_sibling NextMapName
+ pin_corner_to_sibling BOTTOM_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+
+ ypos -8
+ zpos 1
+
+ auto_wide_tocontents 1
+ auto_tall_tocontents 1
+ labelText ""
+ use_proportional_insets 1
+ textinsetx 2
+ font Default_28_DropShadow
+ allcaps 1
+ fgcolor_override "255 255 255 255"
+ }
+ NextModeIcon
+ {
+ ControlName RuiPanel
+ wide 72
+ tall 72
+ visible 0
+ scaleImage 1
+ image ""
+ zpos 1
+
+ rui "ui/basic_image_add.rpak"
+
+ pin_to_sibling NextGameModeName
+ pin_corner_to_sibling BOTTOM_RIGHT
+ pin_to_sibling_corner TOP_RIGHT
+ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+ FooterButtons
+ {
+ ControlName CNestedPanel
+ InheritProperties FooterButtons
+ }
+ }
+}
diff --git a/Northstar.Client/scripts/vscripts/ui/menu_lobby.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_lobby.nut
index 3c868aab2..3c868aab2 100644
--- a/Northstar.Client/scripts/vscripts/ui/menu_lobby.nut
+++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_lobby.nut
diff --git a/Northstar.Client/scripts/vscripts/ui/menu_map_select.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_map_select.nut
index 7ed0d1773..7ed0d1773 100644
--- a/Northstar.Client/scripts/vscripts/ui/menu_map_select.nut
+++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_map_select.nut
diff --git a/Northstar.Client/scripts/vscripts/ui/menu_match_settings.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_match_settings.nut
index fb6cde1a9..fb6cde1a9 100644
--- a/Northstar.Client/scripts/vscripts/ui/menu_match_settings.nut
+++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_match_settings.nut
diff --git a/Northstar.Client/scripts/vscripts/ui/menu_mode_select.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_mode_select.nut
index 233767816..a017fb422 100644
--- a/Northstar.Client/scripts/vscripts/ui/menu_mode_select.nut
+++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_mode_select.nut
@@ -48,9 +48,14 @@ void function UpdateVisibleModes()
int modeIndex = i + ( file.currentModePage * MODES_PER_PAGE )
SetButtonRuiText( buttons[ i ], GetGameModeDisplayName( modesArray[ modeIndex ] ) )
- Hud_SetEnabled( buttons[ i ], true )
+
+ Hud_SetEnabled( buttons[ i ], true )
Hud_SetVisible( buttons[ i ], true )
- Hud_SetLocked( buttons[ i ], false )
+
+ if ( !ModeSettings_RequiresAI( modesArray[ modeIndex ] ) )
+ Hud_SetLocked( buttons[ i ], false )
+ else
+ Hud_SetLocked( buttons[ i ], true )
if ( !PrivateMatch_IsValidMapModeCombo( PrivateMatch_GetSelectedMap(), modesArray[ modeIndex ] ) && !IsNorthstarServer() )
{
diff --git a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_connect_password.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_connect_password.nut
new file mode 100644
index 000000000..e1ed8991d
--- /dev/null
+++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_connect_password.nut
@@ -0,0 +1,30 @@
+global function AddNorthstarConnectWithPasswordMenu
+
+void function AddNorthstarConnectWithPasswordMenu()
+{
+ AddMenu( "ConnectWithPasswordMenu", $"resource/ui/menus/connect_password.menu", InitConnectWithPasswordMenu, "#MENU_CONNECT" )
+}
+
+void function InitConnectWithPasswordMenu()
+{
+ AddMenuEventHandler( GetMenu( "ConnectWithPasswordMenu" ), eUIEvent.MENU_OPEN, OnConnectWithPasswordMenuOpened )
+ AddMenuFooterOption( GetMenu( "ConnectWithPasswordMenu" ), BUTTON_B, "#B_BUTTON_BACK", "#BACK" )
+
+ AddButtonEventHandler( Hud_GetChild( GetMenu( "ConnectWithPasswordMenu" ), "ConnectButton" ), UIE_CLICK, ConnectWithPassword )
+ RegisterButtonPressedCallback( KEY_ENTER, ConnectWithPassword )
+}
+
+void function OnConnectWithPasswordMenuOpened()
+{
+ UI_SetPresentationType( ePresentationType.KNOWLEDGEBASE_SUB )
+
+ Hud_SetText( Hud_GetChild( GetMenu( "ConnectWithPasswordMenu" ), "Title" ), "#MENU_TITLE_CONNECT_PASSWORD" )
+ Hud_SetText( Hud_GetChild( GetMenu( "ConnectWithPasswordMenu" ), "ConnectButton" ), "#MENU_CONNECT_MENU_CONNECT" )
+ Hud_SetText( Hud_GetChild( GetMenu( "ConnectWithPasswordMenu" ), "EnterPasswordBox" ), "" )
+}
+
+void function ConnectWithPassword( var button )
+{
+ if ( GetTopNonDialogMenu() == GetMenu( "ConnectWithPasswordMenu" ) )
+ thread ThreadedAuthAndConnectToServer( Hud_GetUTF8Text( Hud_GetChild( GetMenu( "ConnectWithPasswordMenu" ), "EnterPasswordBox" ) ) )
+} \ No newline at end of file
diff --git a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_custom_match_settings.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_custom_match_settings.nut
new file mode 100644
index 000000000..d39b77748
--- /dev/null
+++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_custom_match_settings.nut
@@ -0,0 +1,140 @@
+global function AddNorthstarCustomMatchSettingsMenu
+global function SetNextMatchSettingsCategory
+
+const string SETTING_ITEM_TEXT = " " // this is long enough to be the same size as the textentry field
+
+struct {
+ string currentCategory
+
+ table< int, int > enumRealValues
+} file
+
+void function AddNorthstarCustomMatchSettingsMenu()
+{
+ AddMenu( "CustomMatchSettingsMenu", $"resource/ui/menus/custom_match_settings.menu", InitNorthstarCustomMatchSettingsMenu, "#MENU_MATCH_SETTINGS" )
+}
+
+void function SetNextMatchSettingsCategory( string category )
+{
+ file.currentCategory = category
+ print( "Category: " + category )
+
+ file.enumRealValues.clear()
+}
+
+void function InitNorthstarCustomMatchSettingsMenu()
+{
+ AddMenuEventHandler( GetMenu( "CustomMatchSettingsMenu" ), eUIEvent.MENU_OPEN, OnNorthstarCustomMatchSettingsMenuOpened )
+ AddMenuFooterOption( GetMenu( "CustomMatchSettingsMenu" ), BUTTON_B, "#B_BUTTON_BACK", "#BACK" )
+
+ foreach ( var button in GetElementsByClassname( GetMenu( "CustomMatchSettingsMenu" ), "MatchSettingButton" ) )
+ {
+ // it's not possible to clear dialoglists, so we have to hack together stuff that effectively recreates their functionality
+ Hud_DialogList_AddListItem( button, SETTING_ITEM_TEXT, "prev" )
+ Hud_DialogList_AddListItem( button, SETTING_ITEM_TEXT, "main" )
+ Hud_DialogList_AddListItem( button, SETTING_ITEM_TEXT, "next" )
+
+ AddButtonEventHandler( button, UIE_CHANGE, OnSettingButtonPressed )
+ }
+
+ foreach ( var textPanel in GetElementsByClassname( GetMenu( "CustomMatchSettingsMenu" ), "MatchSettingTextEntry" ) )
+ Hud_AddEventHandler( textPanel, UIE_LOSE_FOCUS, SendTextPanelChanges )
+}
+
+void function OnNorthstarCustomMatchSettingsMenuOpened()
+{
+ array<var> buttons = GetElementsByClassname( GetMenu( "CustomMatchSettingsMenu" ), "MatchSettingButton" )
+ array<var> textPanels = GetElementsByClassname( GetMenu( "CustomMatchSettingsMenu" ), "MatchSettingTextEntry" )
+
+ foreach ( var button in buttons )
+ {
+ Hud_SetEnabled( button, false )
+ Hud_SetVisible( button, false )
+ }
+
+ foreach ( var textPanel in textPanels )
+ {
+ Hud_SetEnabled( textPanel, false )
+ Hud_SetVisible( textPanel, false )
+ }
+
+ int i = 0;
+ foreach ( CustomMatchSettingContainer setting in GetPrivateMatchCustomSettingsForCategory( file.currentCategory ) )
+ {
+ Hud_SetEnabled( buttons[ i ], true )
+ Hud_SetVisible( buttons[ i ], true )
+ Hud_SetText( buttons[ i ], setting.localizedName )
+ Hud_SetDialogListSelectionValue( buttons[ i ], "main" )
+
+ Hud_SetEnabled( textPanels[ i ], true )
+ Hud_SetVisible( textPanels[ i ], true )
+
+ // manually resolve default gamemode/playlist vars since game won't do it for us if we aren't using GetCurrentPlaylistVar
+ string gamemode = PrivateMatch_GetSelectedMode()
+ if ( gamemode != "speedball" ) // hack since lf is weird
+ gamemode = GetPlaylistGamemodeByIndex( gamemode, 0 )
+
+ string gamemodeVar = GetGamemodeVarOrUseValue( PrivateMatch_GetSelectedMode(), setting.playlistVar, setting.defaultValue )
+ string playlistVar = GetPlaylistVarOrUseValue( PrivateMatch_GetSelectedMode(), setting.playlistVar, setting.defaultValue )
+
+ if ( playlistVar != gamemodeVar && playlistVar == setting.defaultValue )
+ playlistVar = gamemodeVar
+
+ if ( setting.isEnumSetting )
+ {
+ // setup internal state for enums
+ int enumIndex = int ( max( 0, setting.enumValues.find( playlistVar ) ) )
+
+ file.enumRealValues[ int( Hud_GetScriptID( textPanels[ i ] ) ) ] <- enumIndex
+ Hud_SetText( textPanels[ i ], setting.enumNames[ enumIndex ] )
+ }
+ else
+ Hud_SetText( textPanels[ i ], playlistVar )
+
+ i++
+ }
+}
+
+void function OnSettingButtonPressed( var button )
+{
+ CustomMatchSettingContainer setting = GetPrivateMatchCustomSettingsForCategory( file.currentCategory )[ int( Hud_GetScriptID( button ) ) ]
+ var textPanel = GetElementsByClassname( GetMenu( "CustomMatchSettingsMenu" ), "MatchSettingTextEntry" )[ int( Hud_GetScriptID( button ) ) ]
+
+ if ( setting.isEnumSetting )
+ {
+ string selectionVal = Hud_GetDialogListSelectionValue( button )
+ if ( selectionVal == "main" )
+ return
+
+ int enumVal = file.enumRealValues[ int( Hud_GetScriptID( button ) ) ]
+ if ( selectionVal == "next" ) // enum val += 1
+ enumVal = ( enumVal + 1 ) % setting.enumValues.len()
+ else // enum val -= 1
+ {
+ enumVal--
+ if ( enumVal == -1 )
+ enumVal = setting.enumValues.len() - 1
+ }
+
+ file.enumRealValues[ int( Hud_GetScriptID( button ) ) ] = enumVal
+ Hud_SetText( textPanel, setting.enumNames[ enumVal ] )
+
+ ClientCommand( "PrivateMatchSetPlaylistVarOverride " + setting.playlistVar + " " + setting.enumValues[ enumVal ] )
+ }
+ else
+ {
+ // this doesn't work for some reason
+ Hud_SetFocused( textPanel )
+ }
+
+ Hud_SetDialogListSelectionValue( button, "main" )
+}
+
+void function SendTextPanelChanges( var textPanel )
+{
+ CustomMatchSettingContainer setting = GetPrivateMatchCustomSettingsForCategory( file.currentCategory )[ int( Hud_GetScriptID( textPanel ) ) ]
+
+ // enums don't need to do this
+ if ( !setting.isEnumSetting )
+ ClientCommand( "PrivateMatchSetPlaylistVarOverride " + setting.playlistVar + " " + Hud_GetUTF8Text( textPanel ) )
+} \ No newline at end of file
diff --git a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_custom_match_settings_categories.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_custom_match_settings_categories.nut
new file mode 100644
index 000000000..711cbbbcf
--- /dev/null
+++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_custom_match_settings_categories.nut
@@ -0,0 +1,68 @@
+global function AddNorthstarCustomMatchSettingsCategoryMenu
+
+void function AddNorthstarCustomMatchSettingsCategoryMenu()
+{
+ AddMenu( "CustomMatchSettingsCategoryMenu", $"resource/ui/menus/custom_match_settings_categories.menu", InitNorthstarCustomMatchSettingsCategoryMenu, "#MENU_MATCH_SETTINGS" )
+}
+
+void function InitNorthstarCustomMatchSettingsCategoryMenu()
+{
+ AddMenuEventHandler( GetMenu( "CustomMatchSettingsCategoryMenu" ), eUIEvent.MENU_OPEN, OnNorthstarCustomMatchSettingsCategoryMenuOpened )
+ AddMenuFooterOption( GetMenu( "CustomMatchSettingsCategoryMenu" ), BUTTON_B, "#B_BUTTON_BACK", "#BACK" )
+ AddMenuFooterOption( GetMenu( "CustomMatchSettingsCategoryMenu" ), BUTTON_Y, "#Y_BUTTON_RESTORE_DEFAULTS", "#RESTORE_DEFAULTS", ResetMatchSettingsToDefault )
+
+ foreach ( var button in GetElementsByClassname( GetMenu( "CustomMatchSettingsCategoryMenu" ), "MatchSettingCategoryButton" ) )
+ {
+ AddButtonEventHandler( button, UIE_CLICK, SelectPrivateMatchSettingsCategory )
+
+ Hud_SetEnabled( button, false )
+ Hud_SetVisible( button, false )
+ }
+}
+
+void function OnNorthstarCustomMatchSettingsCategoryMenuOpened()
+{
+ array<string> categories = GetPrivateMatchSettingCategories()
+ array<var> buttons = GetElementsByClassname( GetMenu( "CustomMatchSettingsCategoryMenu" ), "MatchSettingCategoryButton" )
+
+ for ( int i = 0, j = 0; j < categories.len() && i < buttons.len(); i++, j++ )
+ {
+ Hud_SetEnabled( buttons[ i ], false )
+ Hud_SetVisible( buttons[ i ], false )
+
+ // skip gamemode/playlist categories for modes that aren't the current one
+ // todo this fucking breaks everything lmao
+ //bool gamemode = categories[ j ].find( "#GAMEMODE_" ) == 0
+ //if ( gamemode || categories[ j ].find( "#PL_" ) == 0 )
+ //{
+ // if ( gamemode )
+ // {
+ // if ( categories[ j ].slice( 10 ) != PrivateMatch_GetSelectedMode() )
+ // {
+ // i--
+ // continue
+ // }
+ // }
+ // else if ( categories[ j ].slice( 4 ) != PrivateMatch_GetSelectedMode() )
+ // {
+ // i--
+ // continue
+ // }
+ //}
+
+ Hud_SetText( buttons[ i ], Localize( categories[ j ] ) + " ->" )
+ Hud_SetEnabled( buttons[ i ], true )
+ Hud_SetVisible( buttons[ i ], true )
+ }
+}
+
+void function SelectPrivateMatchSettingsCategory( var button )
+{
+ SetNextMatchSettingsCategory( GetPrivateMatchSettingCategories()[ int( Hud_GetScriptID( button ) ) ] )
+ AdvanceMenu( GetMenu( "CustomMatchSettingsMenu" ) )
+}
+
+void function ResetMatchSettingsToDefault( var button )
+{
+ ClientCommand( "ResetMatchSettingsToDefault" )
+} \ No newline at end of file
diff --git a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_modmenu.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_modmenu.nut
new file mode 100644
index 000000000..4a56891e3
--- /dev/null
+++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_modmenu.nut
@@ -0,0 +1,108 @@
+global function AddNorthstarModMenu
+global function AddNorthstarModMenu_MainMenuFooter
+
+void function AddNorthstarModMenu()
+{
+ AddMenu( "ModListMenu", $"resource/ui/menus/modlist.menu", InitModMenu )
+}
+
+void function AddNorthstarModMenu_MainMenuFooter()
+{
+ AddMenuFooterOption( GetMenu( "MainMenu" ), BUTTON_Y, "#Y_MENU_TITLE_MODS", "#MENU_TITLE_MODS", AdvanceToModListMenu )
+}
+
+void function AdvanceToModListMenu( var button )
+{
+ AdvanceMenu( GetMenu( "ModListMenu" ) )
+}
+
+void function InitModMenu()
+{
+ var menu = GetMenu( "ModListMenu" )
+
+ AddMenuEventHandler( menu, eUIEvent.MENU_OPEN, OnModMenuOpened )
+ AddMenuFooterOption( menu, BUTTON_B, "#B_BUTTON_BACK", "#BACK" )
+ AddMenuFooterOption( menu, BUTTON_Y, "#Y_RELOAD_MODS", "#RELOAD_MODS", ReloadMods )
+
+ foreach ( var button in GetElementsByClassname( GetMenu( "ModListMenu" ), "ModButton" ) )
+ AddButtonEventHandler( button, UIE_GET_FOCUS, OnModMenuButtonFocused )
+}
+
+void function OnModMenuOpened()
+{
+ Hud_SetText( Hud_GetChild( GetMenu( "ModListMenu" ), "Title" ), "#MENU_TITLE_MODS" )
+
+ array<var> buttons = GetElementsByClassname( GetMenu( "ModListMenu" ), "ModButton" )
+
+ // disable all buttons, we'll enable the ones we need later
+ foreach ( var button in buttons )
+ {
+ Hud_SetEnabled( button, false )
+ Hud_SetVisible( button, false )
+ }
+
+ array<string> modNames = NSGetModNames()
+ for ( int i = 0; i < modNames.len() && i < buttons.len(); i++ )
+ {
+ Hud_SetEnabled( buttons[ i ], true )
+ Hud_SetVisible( buttons[ i ], true )
+
+ SetButtonRuiText( buttons[ i ], modNames[ i ] + " v" + NSGetModVersionByModName( modNames[ i ] ) )
+ }
+}
+
+void function OnModMenuButtonFocused( var button )
+{
+ string modName = NSGetModNames()[ int ( Hud_GetScriptID( button ) ) ]
+
+ var rui = Hud_GetRui( Hud_GetChild( GetMenu( "ModListMenu" ), "LabelDetails" ) )
+
+ RuiSetGameTime( rui, "startTime", -99999.99 ) // make sure it skips the whole animation for showing this
+ RuiSetString( rui, "headerText", modName )
+ RuiSetString( rui, "messageText", FormatModDescription( modName ) )
+}
+
+string function FormatModDescription( string modName )
+{
+ string ret
+ // version
+ ret += format( "Version %s\n", NSGetModVersionByModName( modName ) )
+
+ // download link
+ string modLink = NSGetModDownloadLinkByModName( modName )
+ if ( modLink.len() != 0 )
+ ret += format( "Download link: \"%s\"\n", modLink )
+
+ // load priority
+ ret += format( "Load Priority: %i\n", NSGetModLoadPriority( modName ) )
+
+ // todo: add ClientRequired here
+
+ // convars
+ array<string> modCvars = NSGetModConvarsByModName( modName )
+ if ( modCvars.len() != 0 )
+ {
+ ret += "ConVars: "
+
+ for ( int i = 0; i < modCvars.len(); i++ )
+ {
+ if ( i != modCvars.len() - 1 )
+ ret += format( "\"%s\", ", modCvars[ i ] )
+ else
+ ret += format( "\"%s\"", modCvars[ i ] )
+ }
+
+ ret += "\n"
+ }
+
+ // description
+ ret += format( "\n%s\n", NSGetModDescriptionByModName( modName ) )
+
+ return ret
+}
+
+void function ReloadMods( var button )
+{
+ NSReloadMods()
+ OnModMenuOpened() // temp, until we start doing uiscript_reset here
+} \ No newline at end of file
diff --git a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut
new file mode 100644
index 000000000..bbeb0d0b9
--- /dev/null
+++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut
@@ -0,0 +1,198 @@
+global function AddNorthstarServerBrowserMenu
+global function ThreadedAuthAndConnectToServer
+
+const int BUTTONS_PER_PAGE = 15
+
+struct {
+ int page = 0
+ int lastSelectedServer = 0
+} file
+
+void function AddNorthstarServerBrowserMenu()
+{
+ AddMenu( "ServerBrowserMenu", $"resource/ui/menus/server_browser.menu", InitServerBrowserMenu, "#MENU_SERVER_BROWSER" )
+}
+
+void function InitServerBrowserMenu()
+{
+ AddMenuEventHandler( GetMenu( "ServerBrowserMenu" ), eUIEvent.MENU_OPEN, OnServerBrowserMenuOpened )
+ AddMenuFooterOption( GetMenu( "ServerBrowserMenu" ), BUTTON_B, "#B_BUTTON_BACK", "#BACK" )
+ AddMenuFooterOption( GetMenu( "ServerBrowserMenu" ), BUTTON_Y, "#Y_REFRESH_SERVERS", "#REFRESH_SERVERS", RefreshServers )
+
+ foreach ( var button in GetElementsByClassname( GetMenu( "ServerBrowserMenu" ), "ServerButton" ) )
+ {
+ AddButtonEventHandler( button, UIE_GET_FOCUS, OnServerFocused )
+ AddButtonEventHandler( button, UIE_CLICK, OnServerSelected )
+ }
+}
+
+void function OnServerBrowserMenuOpened()
+{
+ Hud_SetText( Hud_GetChild( GetMenu( "ServerBrowserMenu" ), "Title" ), "#MENU_TITLE_SERVER_BROWSER" )
+ UI_SetPresentationType( ePresentationType.KNOWLEDGEBASE_MAIN )
+
+ file.page = 0
+ // dont rerequest if we came from the connect menu
+ if ( !NSIsRequestingServerList() && uiGlobal.lastMenuNavDirection != MENU_NAV_BACK )
+ {
+ NSClearRecievedServerList()
+ NSRequestServerList()
+ }
+
+ thread WaitForServerListRequest()
+}
+
+void function RefreshServers( var button )
+{
+ if ( NSIsRequestingServerList() )
+ return
+
+ NSClearRecievedServerList()
+ NSRequestServerList()
+
+ thread WaitForServerListRequest()
+}
+
+void function WaitForServerListRequest()
+{
+ var menu = GetMenu( "ServerBrowserMenu" )
+ array<var> serverButtons = GetElementsByClassname( menu, "ServerButton" )
+ foreach ( var button in serverButtons )
+ {
+ Hud_SetEnabled( button, false )
+ Hud_SetVisible( button, false )
+ }
+
+ Hud_SetVisible( Hud_GetChild( menu, "LabelDetails" ), false )
+ Hud_SetVisible( Hud_GetChild( menu, "NextMapImage" ), false )
+ Hud_SetVisible( Hud_GetChild( menu, "NextMapName" ), false )
+ Hud_SetVisible( Hud_GetChild( menu, "NextModeIcon" ), false )
+ Hud_SetVisible( Hud_GetChild( menu, "NextGameModeName" ), false )
+
+ Hud_SetEnabled( serverButtons[ 0 ], true )
+ Hud_SetVisible( serverButtons[ 0 ], true )
+
+ SetButtonRuiText( serverButtons[ 0 ], "#NS_SERVERBROWSER_WAITINGFORSERVERS" )
+
+ // wait for request to complete
+ while ( NSIsRequestingServerList() )
+ WaitFrame()
+
+ if ( !NSMasterServerConnectionSuccessful() )
+ SetButtonRuiText( serverButtons[ 0 ], "#NS_SERVERBROWSER_CONNECTIONFAILED" )
+ else
+ UpdateShownPage()
+}
+
+void function UpdateShownPage()
+{
+ var menu = GetMenu( "ServerBrowserMenu" )
+
+ // hide old ui elements
+ array<var> serverButtons = GetElementsByClassname( menu, "ServerButton" )
+ foreach ( var button in serverButtons )
+ {
+ Hud_SetEnabled( button, false )
+ Hud_SetVisible( button, false )
+ }
+
+ Hud_SetFocused( serverButtons[ serverButtons.len() - 1 ] )
+
+ Hud_SetVisible( Hud_GetChild( menu, "LabelDetails" ), false )
+ Hud_SetVisible( Hud_GetChild( menu, "NextMapImage" ), false )
+ Hud_SetVisible( Hud_GetChild( menu, "NextMapName" ), false )
+ Hud_SetVisible( Hud_GetChild( menu, "NextModeIcon" ), false )
+ Hud_SetVisible( Hud_GetChild( menu, "NextGameModeName" ), false )
+
+ for ( int i = 0; i < NSGetServerCount() && i < serverButtons.len(); i++ )
+ {
+ int serverIndex = file.page * BUTTONS_PER_PAGE + i
+
+ Hud_SetEnabled( serverButtons[ i ], true )
+ Hud_SetVisible( serverButtons[ i ], true )
+ SetButtonRuiText( serverButtons[ i ], NSGetServerName( serverIndex ) )
+ }
+
+ if ( NSGetServerCount() == 0 )
+ {
+ Hud_SetEnabled( serverButtons[ 0 ], true )
+ Hud_SetVisible( serverButtons[ 0 ], true )
+ SetButtonRuiText( serverButtons[ 0 ], "#NS_SERVERBROWSER_NOSERVERS" )
+ }
+}
+
+void function OnServerFocused( var button )
+{
+ if ( NSIsRequestingServerList() || !NSMasterServerConnectionSuccessful() || NSGetServerCount() == 0 )
+ return
+
+ var menu = GetMenu( "ServerBrowserMenu" )
+ int serverIndex = file.page * BUTTONS_PER_PAGE + int ( Hud_GetScriptID( button ) )
+
+ // text panel
+ Hud_SetVisible( Hud_GetChild( menu, "LabelDetails" ), true )
+ var textRui = Hud_GetRui( Hud_GetChild( menu, "LabelDetails" ) )
+ RuiSetGameTime( textRui, "startTime", -99999.99 ) // make sure it skips the whole animation for showing this
+ RuiSetString( textRui, "messageText", FormatServerDescription( serverIndex ) )
+
+ // map name/image
+ string map = NSGetServerMap( serverIndex )
+ Hud_SetVisible( Hud_GetChild( menu, "NextMapImage" ), true )
+ RuiSetImage( Hud_GetRui( Hud_GetChild( menu, "NextMapImage" ) ), "basicImage", GetMapImageForMapName( map ) )
+ Hud_SetVisible( Hud_GetChild( menu, "NextMapName" ), true )
+ Hud_SetText( Hud_GetChild( menu, "NextMapName" ), GetMapDisplayName( map ) )
+
+ // mode name/image
+ string mode = NSGetServerPlaylist( serverIndex )
+ Hud_SetVisible( Hud_GetChild( menu, "NextModeIcon" ), true )
+ RuiSetImage( Hud_GetRui( Hud_GetChild( menu, "NextModeIcon" ) ), "basicImage", GetPlaylistThumbnailImage( mode ) )
+ Hud_SetVisible( Hud_GetChild( menu, "NextGameModeName" ), true )
+
+ string displayName = GetGameModeDisplayName( mode )
+ if ( displayName.len() != 0 )
+ Hud_SetText( Hud_GetChild( menu, "NextGameModeName" ), displayName )
+ else
+ Hud_SetText( Hud_GetChild( menu, "NextGameModeName" ), "#NS_SERVERBROWSER_UNKNOWNMODE" )
+}
+
+string function FormatServerDescription( int server )
+{
+ string ret = "\n\n\n\n"
+
+ ret += NSGetServerName( server ) + "\n"
+ ret += format( "%i/%i players\n", NSGetServerPlayerCount( server ), NSGetServerMaxPlayerCount( server ) )
+ ret += NSGetServerDescription( server ) + "\n"
+
+ return ret
+}
+
+void function OnServerSelected( var button )
+{
+ if ( NSIsRequestingServerList() || !NSMasterServerConnectionSuccessful() )
+ return
+
+ var menu = GetMenu( "ServerBrowserMenu" )
+ int serverIndex = file.page * BUTTONS_PER_PAGE + int ( Hud_GetScriptID( button ) )
+
+ file.lastSelectedServer = serverIndex
+
+ if ( NSServerRequiresPassword( serverIndex ) )
+ AdvanceMenu( GetMenu( "ConnectWithPasswordMenu" ) )
+ else
+ thread ThreadedAuthAndConnectToServer()
+}
+
+void function ThreadedAuthAndConnectToServer( string password = "" )
+{
+ if ( NSIsAuthenticatingWithServer() )
+ return
+
+ print( "trying to authenticate with server " + NSGetServerName( file.lastSelectedServer ) + " with password " + password )
+ NSTryAuthWithServer( file.lastSelectedServer, password )
+
+ while ( NSIsAuthenticatingWithServer() )
+ WaitFrame()
+
+ if ( NSWasAuthSuccessful() )
+ NSConnectToAuthedServer()
+} \ No newline at end of file
diff --git a/Northstar.Client/scripts/vscripts/ui/menu_private_match.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_private_match.nut
index 465991356..b1da22ee3 100644
--- a/Northstar.Client/scripts/vscripts/ui/menu_private_match.nut
+++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_private_match.nut
@@ -224,7 +224,10 @@ void function OnSelectMatchSettings_Activate( var button )
if ( Hud_IsLocked( button ) )
return
- AdvanceMenu( GetMenu( "MatchSettingsMenu" ) )
+ if ( !IsNorthstarServer() )
+ AdvanceMenu( GetMenu( "MatchSettingsMenu" ) )
+ else
+ AdvanceMenu( GetMenu( "CustomMatchSettingsCategoryMenu" ) )
}
void function SetupComboButtons( var menu, var navUpButton, var navDownButton )
@@ -616,13 +619,35 @@ function UpdateLobby()
{
float varOrigVal = float( GetCurrentPlaylistGamemodeByIndexVar( gamemodeIdx, varName, false ) )
float varOverrideVal = float( GetCurrentPlaylistGamemodeByIndexVar( gamemodeIdx, varName, true ) )
- if ( varOrigVal == varOverrideVal )
+ if ( varOrigVal == varOverrideVal && !IsNorthstarServer() ) // stuff seems to break outside of northstar servers since we dont always use private_match playlist
continue
string label = Localize( MatchSettings_PlaylistVarLabels[varName] ) + ": "
string value = MatchSettings_FormatPlaylistVarValue( varName, varOverrideVal )
playlistOverridesDesc = playlistOverridesDesc + label + "`2" + value + " `0\n"
}
+ else
+ {
+ foreach ( string category in GetPrivateMatchSettingCategories() )
+ {
+ foreach ( CustomMatchSettingContainer setting in GetPrivateMatchCustomSettingsForCategory( category ) )
+ {
+ if ( setting.playlistVar == varName )
+ {
+ if ( setting.isEnumSetting )
+ {
+ playlistOverridesDesc += Localize( setting.localizedName ) + ": `2" + setting.enumNames[ setting.enumValues.find( expect string ( GetCurrentPlaylistVar( varName ) ) ) ] + "`0\n"
+ }
+ else
+ playlistOverridesDesc += Localize( setting.localizedName ) + ": `2" + GetCurrentPlaylistVar( varName ) + "`0\n"
+
+ break
+ }
+ }
+ }
+
+ // sorta temp: ideally wanna localise playlist var names in the future
+ }
}
if ( playlistOverridesDesc.len() )
diff --git a/Northstar.Client/scripts/vscripts/ui/panel_mainmenu.nut b/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut
index f68c9c123..acd11237d 100644
--- a/Northstar.Client/scripts/vscripts/ui/panel_mainmenu.nut
+++ b/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut
@@ -505,12 +505,26 @@ void function OnPlayFDButton_Activate( var button ) // repurposed for launching
//// Lobby_SetFDMode( true )
//thread file.mpButtonActivateFunc()
- ClientCommand( "everything_unlocked 1" ) // todo super temp, need this removed when server autoexecs are good
- ClientCommand( "setplaylist tdm" )
- ClientCommand( "map mp_lobby" )
+ //ClientCommand( "setplaylist tdm" )
+ //ClientCommand( "map mp_lobby" )
+
+ NSTryAuthWithLocalServer()
+ thread TryAuthWithLocalServer()
}
}
+void function TryAuthWithLocalServer()
+{
+ while ( NSIsAuthenticatingWithServer() )
+ WaitFrame()
+
+ if ( NSWasAuthSuccessful() )
+ NSCompleteAuthWithLocalServer()
+
+ ClientCommand( "setplaylist tdm" )
+ ClientCommand( "map mp_lobby" )
+}
+
void function OnPlayMPButton_Activate( var button )
{
if ( file.mpButtonActivateFunc == null )
diff --git a/Northstar.Client/scripts/vscripts/ui/ui_utility.gnut b/Northstar.Client/mod/scripts/vscripts/ui/ui_utility.gnut
index 02d77795a..02d77795a 100644
--- a/Northstar.Client/scripts/vscripts/ui/ui_utility.gnut
+++ b/Northstar.Client/mod/scripts/vscripts/ui/ui_utility.gnut
diff --git a/Northstar.Client/scripts/vscripts/ui/_menus.nut b/Northstar.Client/scripts/vscripts/ui/_menus.nut
deleted file mode 100644
index ffae9a30e..000000000
--- a/Northstar.Client/scripts/vscripts/ui/_menus.nut
+++ /dev/null
@@ -1,2010 +0,0 @@
-untyped
-
-global const bool EDIT_LOADOUT_SELECTS = true
-global const string PURCHASE_SUCCESS_SOUND = "UI_Menu_Store_Purchase_Success"
-
-global function UICodeCallback_CloseAllMenus
-global function UICodeCallback_ActivateMenus
-global function UICodeCallback_LevelInit
-global function UICodeCallback_LevelLoadingStarted
-global function UICodeCallback_LevelLoadingFinished
-global function UICodeCallback_LevelShutdown
-global function UICodeCallback_OnConnected
-global function UICodeCallback_OnFocusChanged
-global function UICodeCallback_NavigateBack
-global function UICodeCallback_ToggleInGameMenu
-global function UICodeCallback_TryCloseDialog
-global function UICodeCallback_UpdateLoadingLevelName
-global function UICodeCallback_ConsoleKeyboardClosed
-global function UICodeCallback_ErrorDialog
-global function UICodeCallback_AcceptInvite
-global function UICodeCallback_OnDetenteDisplayed
-global function UICodeCallback_OnSpLogDisplayed
-global function UICodeCallback_EntitlementsChanged
-global function UICodeCallback_StoreTransactionCompleted
-global function UICodeCallback_GamePurchased
-global function UICodeCallback_PartyUpdated
-global function UICodeCallback_KeyBindOverwritten
-
-global function AdvanceMenu
-global function OpenSubmenu // REMOVE
-global function CloseSubmenu // REMOVE
-global function CloseActiveMenu
-global function CloseActiveMenuNoParms
-global function CloseAllMenus
-global function CloseAllInGameMenus
-global function CloseAllDialogs
-global function CloseAllToTargetMenu
-global function PrintMenuStack
-global function CleanupInGameMenus
-global function GetActiveMenu
-global function GetMenu
-global function GetPanel
-global function GetAllMenuPanels
-global function InitGamepadConfigs
-global function InitMenus
-global function AdvanceMenuEventHandler
-global function PCSwitchTeamsButton_Activate
-global function PCToggleSpectateButton_Activate
-global function AddMenuElementsByClassname
-global function FocusDefault
-global function SetPanelDefaultFocus
-global function PanelFocusDefault
-global function OpenMenuWrapper
-global function CloseMenuWrapper
-global function IsLevelMultiplayer
-global function AddMenuEventHandler
-global function AddPanelEventHandler
-global function AddButtonEventHandler
-global function AddEventHandlerToButton
-global function AddEventHandlerToButtonClass
-global function DisableMusic
-global function EnableMusic
-global function PlayMusic
-global function StopMusic
-global function IsMenuInMenuStack
-global function GetTopNonDialogMenu
-global function IsDialog
-global function IsDialogActive
-global function IsDialogOnlyActiveMenu
-global function SetNavUpDown
-global function SetNavLeftRight
-global function IsTrialPeriodActive
-global function LaunchGamePurchaseOrDLCStore
-global function SetMenuThinkFunc
-
-global function PCBackButton_Activate
-
-global function RegisterMenuVarInt
-global function GetMenuVarInt
-global function SetMenuVarInt
-global function RegisterMenuVarBool
-global function GetMenuVarBool
-global function SetMenuVarBool
-global function RegisterMenuVarVar
-global function GetMenuVarVar
-global function SetMenuVarVar
-global function AddMenuVarChangeHandler
-
-global function InviteFriends
-
-global function HACK_DelayedSetFocus_BecauseWhy
-
-#if DURANGO_PROG
- global function OpenXboxPartyApp
- global function OpenXboxHelp
-#endif // DURANGO_PROG
-
-global function OpenReviewTermsDialog
-global function ClassicMusic_OnChange
-global function IsClassicMusicAvailable
-
-
-void function UICodeCallback_CloseAllMenus()
-{
- printt( "UICodeCallback_CloseAllMenus" )
- CloseAllMenus()
- // This is usually followed by a call to UICodeCallback_ActivateMenus().
-}
-
-// Bringing up the console will cause this, and it probably shouldn't
-void function UICodeCallback_ActivateMenus()
-{
- if ( IsConnected() )
- return
-
- printt( "UICodeCallback_ActivateMenus:", uiGlobal.activeMenu && Hud_GetHudName( uiGlobal.activeMenu ) )
-
- if ( uiGlobal.menuStack.len() == 0 )
- {
- AdvanceMenu( GetMenu( "MainMenu" ) )
- }
-
- if ( uiGlobal.activeMenu == GetMenu( "MainMenu" ) )
- Signal( uiGlobal.signalDummy, "OpenErrorDialog" )
-
- PlayMusic()
-
- #if DURANGO_PROG
- Durango_LeaveParty()
- #endif // DURANGO_PROG
-}
-
-void function UICodeCallback_ToggleInGameMenu()
-{
- if ( !IsFullyConnected() )
- return
-
- var activeMenu = uiGlobal.activeMenu
- bool isMP = IsLevelMultiplayer( GetActiveLevel() )
- bool isLobby = IsLobby()
-
- var ingameMenu
- if ( isMP )
- {
- ingameMenu = GetMenu( "InGameMPMenu" )
- }
- else
- {
- // Disable this callback for this special case menu so players can't skip it.
- var spTitanTutorialMenu = GetMenu( "SPTitanLoadoutTutorialMenu" )
- if ( activeMenu == spTitanTutorialMenu )
- return
-
- ingameMenu = GetMenu( "InGameSPMenu" )
- }
-
- if ( IsDialog( uiGlobal.activeMenu ) )
- {
- // Do nothing if a dialog is showing
- }
- else if ( TeamTitanSelectMenuIsOpen() )
- {
- if ( uiGlobal.activeMenu == GetMenu( "TeamTitanSelectMenu" ) )
- {
- // Do nothing here either
- }
- else
- {
- CloseActiveMenu()
- }
- }
- else if ( ( isMP && !isLobby ) || !isMP )
- {
- if ( !activeMenu )
- AdvanceMenu( ingameMenu )
- else
- CloseAllInGameMenus()
- }
-}
-
-// Return true to show load screen, false to not show load screen.
-// levelname can be "" because the level to load isn't always known when the load screen starts
-bool function UICodeCallback_LevelLoadingStarted( string levelname )
-{
- printt( "UICodeCallback_LevelLoadingStarted: " + levelname )
-
- CloseAllDialogs()
-
- uiGlobal.loadingLevel = levelname
-
- StopMusic()
-
- if ( uiGlobal.playingVideo )
- Signal( uiGlobal.signalDummy, "PlayVideoEnded" )
-
- if ( uiGlobal.playingCredits )
- Signal( uiGlobal.signalDummy, "PlayingCreditsDone" )
-
- // kill lingering postgame summary since persistent data may not be available at this point
- Signal( uiGlobal.signalDummy, "PGDisplay" )
-
-#if CONSOLE_PROG
- if ( !Console_IsSignedIn() )
- return false
-#endif
-
- return true
-}
-
-// Return true to show load screen, false to not show load screen.
-bool function UICodeCallback_UpdateLoadingLevelName( string levelname )
-{
- printt( "UICodeCallback_UpdateLoadingLevelName: " + levelname )
-
-#if CONSOLE_PROG
- if ( !Console_IsSignedIn() )
- return false
-#endif
-
- return true
-}
-
-void function UICodeCallback_LevelLoadingFinished( bool error )
-{
- printt( "UICodeCallback_LevelLoadingFinished: " + uiGlobal.loadingLevel + " (" + error + ")" )
-
- if ( !IsLobby() )
- {
- HudChat_ClearTextFromAllChatPanels()
- ResetActiveChatroomLastModified()
- }
- else
- {
- uiGlobal.lobbyFromLoadingScreen = true
- }
-
- uiGlobal.loadingLevel = ""
- Signal( uiGlobal.signalDummy, "LevelFinishedLoading" )
-}
-
-void function UICodeCallback_LevelInit( string levelname )
-{
- Assert( IsConnected() )
-
- StopVideo()
-
- uiGlobal.loadedLevel = levelname
-
- printt( "UICodeCallback_LevelInit: " + uiGlobal.loadedLevel )
-
- if ( !uiGlobal.loadoutsInitialized )
- {
- string gameModeString = GetConVarString( "mp_gamemode" )
- if ( gameModeString != "solo" )
- {
- InitStatsTables()
- }
- }
-
- InitItems()
-
- if ( IsMultiplayer() )
- {
- ShWeaponXP_Init()
- ShTitanXP_Init()
- ShFactionXP_Init()
- }
- else
- {
- SPObjectiveStringsInit()
- }
-
- #if DEV
- UpdatePrecachedSPWeapons()
- #endif
-
-
- if ( !uiGlobal.loadoutsInitialized )
- {
- string gameModeString = GetConVarString( "mp_gamemode" )
- if ( gameModeString != "solo" )
- {
- DeathHints_Init()
- InitDefaultLoadouts()
- CreateChallenges()
- uiGlobal.loadoutsInitialized = true
- }
- }
-
- if ( IsLevelMultiplayer( levelname ) || IsLobbyMapName( levelname ) )
- {
- thread UpdateCachedLoadouts()
- thread UpdateCachedNewItems()
- thread InitUISpawnLoadoutIndexes()
-
- if ( !uiGlobal.eventHandlersAdded )
- {
- uiGlobal.eventHandlersAdded = true
- }
-
- UI_GetAllChallengesProgress()
-
- bool isLobby = IsLobbyMapName( levelname )
-
- string gameModeString = GetConVarString( "mp_gamemode" )
- if ( gameModeString == "" )
- gameModeString = "<null>"
-
- Assert( gameModeString == GetConVarString( "mp_gamemode" ) )
- Assert( gameModeString != "" )
-
- int gameModeId = GameMode_GetGameModeId( gameModeString )
-
- int mapId = eMaps.invalid
- if ( levelname in getconsttable().eMaps )
- {
- mapId = expect int( getconsttable().eMaps[ levelname ] )
- }
- else
- {
- // Don't worry about this until we have to consider R2 Durango TCRs (10/2015)
- //if ( !IsTestMap() )
- // CodeWarning( "No map named '" + levelname + "' exists in eMaps, all shipping maps should be in this enum" )
- }
-
- int difficultyLevelId = 0
- int roundId = 0
-
- if ( isLobby )
- Durango_OnLobbySessionStart( gameModeId, difficultyLevelId )
- else
- Durango_OnMultiplayerRoundStart( gameModeId, mapId, difficultyLevelId, roundId, 0 )
- }
- else
- {
- // SP loadout stuff
- UI_GetAllChallengesProgress() // TODO: Can this be moved so we don't call it twice? It's called above.
-
- SP_ResetObjectiveStringIndex() // Since this persists thru level load, we need to explicitely clear it.
- }
-
- if ( IsMultiplayer() )
- {
- foreach ( callbackFunc in uiGlobal.onLevelInitCallbacks )
- {
- thread callbackFunc()
- }
-
- }
- thread UpdateMenusOnConnect( levelname )
-
- uiGlobal.previousLevel = uiGlobal.loadedLevel
- uiGlobal.previousPlaylist = GetCurrentPlaylistName()
-}
-
-void function UICodeCallback_LevelShutdown()
-{
- Signal( uiGlobal.signalDummy, "LevelShutdown" )
-
- printt( "UICodeCallback_LevelShutdown: " + uiGlobal.loadedLevel )
-
- StopVideo()
-
- if ( uiGlobal.loadedLevel != "" )
- CleanupInGameMenus()
-
- uiGlobal.loadedLevel = ""
- uiGlobal.mapSupportsMenuModelsUpdated = false
- uiGlobal.sp_showAlternateMissionLog = false
-}
-
-void function UICodeCallback_NavigateBack()
-{
- if ( uiGlobal.activeMenu == null )
- return
-
- if ( IsDialog( uiGlobal.activeMenu ) )
- {
- if ( uiGlobal.menuData[ uiGlobal.activeMenu ].dialogData.noChoice ||
- uiGlobal.menuData[ uiGlobal.activeMenu ].dialogData.forceChoice ||
- Time() < uiGlobal.dialogInputEnableTime )
- return
- }
-
- Assert( uiGlobal.activeMenu in uiGlobal.menuData )
- if ( uiGlobal.menuData[ uiGlobal.activeMenu ].navBackFunc != null )
- {
- thread uiGlobal.menuData[ uiGlobal.activeMenu ].navBackFunc()
- return
- }
-
- if ( uiGlobal.activeMenu.GetType() == "submenu" ) // REMOVE
- {
- CloseSubmenu()
- return
- }
-
- CloseActiveMenu( true )
-}
-
-// Called when IsConnected() will start returning true.
-void function UICodeCallback_OnConnected()
-{
-
-}
-
-void function UICodeCallback_OnFocusChanged( var oldFocusedPanel, var newFocusedPanel )
-{
-
-}
-
-// Accepting an origin invite closes dialogs, or aborts if they can't be closed
-bool function UICodeCallback_TryCloseDialog()
-{
- if ( !IsDialog( uiGlobal.activeMenu ) )
- return true
-
- if ( uiGlobal.menuData[ uiGlobal.activeMenu ].dialogData.forceChoice )
- return false
-
- CloseAllDialogs()
- Assert( !IsDialog( uiGlobal.activeMenu ) )
- return true
-}
-
-void function UICodeCallback_ConsoleKeyboardClosed()
-{
- switch ( uiGlobal.activeMenu )
- {
- case GetMenu( "EditPilotLoadoutMenu" ):
- string oldName = GetPilotLoadoutName( GetCachedPilotLoadout( uiGlobal.editingLoadoutIndex ) )
- string newName = GetPilotLoadoutRenameText()
-
- // strip doesn't work on UTF-8 strings
- // newName = strip( newName ) // Remove leading/trailing whitespace
- if ( newName == "" ) // If all whitespace entered reset to previous name
- newName = oldName
-
- SetPilotLoadoutName( newName )
- SelectPilotLoadoutRenameText()
- if ( newName != oldName )
- EmitUISound( "Menu.Accept" ) // No callback when cancelled so for now assume name was changed
- break
-
- default:
- break
- }
-}
-
-void function UICodeCallback_OnDetenteDisplayed()
-{
-// thread PlayDetentSound()
-//}
-//
-//void function PlayDetentSound()
-//{
-// WaitFrame() // otherwise gets killed off by code pause
-// WaitFrame() // otherwise gets killed off by code pause
-// EmitUISound( "Pilot_Killed_Indicator" )
-}
-
-void function UICodeCallback_OnSpLogDisplayed()
-{
-}
-
-void function UICodeCallback_ErrorDialog( string errorDetails )
-{
- printt( "UICodeCallback_ErrorDialog: " + errorDetails )
- thread OpenErrorDialog( errorDetails )
-}
-
-void function UICodeCallback_AcceptInviteThread( string accesstoken )
-{
- printt( "UICodeCallback_AcceptInviteThread '" + accesstoken + "'")
-
- #if PS4_PROG
- if ( !Ps4_PSN_Is_Loggedin() )
- {
- Ps4_LoginDialog_Schedule();
- while( Ps4_LoginDialog_Running() )
- WaitFrame()
- if ( !Ps4_PSN_Is_Loggedin() )
- return;
- }
-
- if( Ps4_CheckPlus_Schedule() )
- {
- while( Ps4_CheckPlus_Running() )
- WaitFrame()
- if( !Ps4_CheckPlus_Allowed() )
- {
- if( Ps4_CheckPlus_GetLastRequestResults() != 0 )
- {
- return
- }
-
- if( Ps4_ScreenPlusDialog_Schedule() )
- {
- while( Ps4_ScreenPlusDialog_Running() )
- WaitFrame()
- if( !Ps4_ScreenPlusDialog_Allowed() )
- return;
- }
- else
- {
- return;
- }
- }
- }
-
- #endif // #if PS4_PROG
-
- SubscribeToChatroomPartyChannel( accesstoken );
-
-}
-
-
-void function UICodeCallback_AcceptInvite( string accesstoken )
-{
- printt( "UICodeCallback_AcceptInvite '" + accesstoken + "'")
- thread UICodeCallback_AcceptInviteThread( accesstoken )
-}
-
-// TODO: replaceCurrent should not be an option. It should be a different function.
-void function AdvanceMenu( var menu, bool replaceCurrent = false )
-{
- //foreach ( index, menu in uiGlobal.menuStack )
- //{
- // if ( menu != null )
- // printt( "menu index " + index + " is named " + menu.GetDisplayName() )
- //}
-
- if ( uiGlobal.activeMenu )
- {
- // Don't open the same menu again if it's already open
- if ( uiGlobal.activeMenu == menu )
- return
-
- // Opening a normal menu while a dialog is open
- Assert( !IsDialog( uiGlobal.activeMenu ), "Tried opening menu: " + Hud_GetHudName( menu ) + " when uiGlobal.activeMenu was: " + Hud_GetHudName( uiGlobal.activeMenu ) )
- }
-
- if ( uiGlobal.activeMenu && !IsDialog( menu ) ) // Dialogs show on top so don't close existing menu when opening them
- {
- SetBlurEnabled( false )
-
- if ( replaceCurrent )
- {
- CloseMenuWrapper( uiGlobal.activeMenu )
- uiGlobal.menuStack.pop()
- }
- else
- {
- CloseMenu( uiGlobal.activeMenu )
- printt( Hud_GetHudName( uiGlobal.activeMenu ), "menu closed" )
- }
- }
-
- if ( IsDialog( menu ) && uiGlobal.activeMenu )
- SetFooterPanelVisibility( uiGlobal.activeMenu, false )
-
- uiGlobal.menuStack.push( menu )
- uiGlobal.activeMenu = menu
-
- uiGlobal.lastMenuNavDirection = MENU_NAV_FORWARD
-
- if ( uiGlobal.activeMenu )
- {
- if ( !IsLobby() && !uiGlobal.mapSupportsMenuModels )
- SetBlurEnabled( true )
-
- OpenMenuWrapper( uiGlobal.activeMenu, true )
- }
-
- Signal( uiGlobal.signalDummy, "ActiveMenuChanged" )
-}
-
-void function SetFooterPanelVisibility( var menu, bool visible )
-{
- if ( !Hud_HasChild( menu, "FooterButtons" ) )
- return
-
- var panel = Hud_GetChild( menu, "FooterButtons" )
- Hud_SetVisible( panel, visible )
-}
-
-void function OpenSubmenu( var menu, bool updateMenuPos = true )
-{
- Assert( menu )
- Assert( menu.GetType() == "submenu" )
-
- if ( uiGlobal.activeMenu )
- {
- // Don't open the same menu again if it's already open
- if ( uiGlobal.activeMenu == menu )
- return
- }
-
- local submenuPos = Hud_GetAbsPos( GetFocus() )
-
- uiGlobal.menuStack.push( menu )
- uiGlobal.activeMenu = menu
-
- OpenMenuWrapper( uiGlobal.activeMenu, true )
-
- if ( updateMenuPos )
- {
- var vguiButtonFrame = Hud_GetChild( uiGlobal.activeMenu, "ButtonFrame" )
- Hud_SetPos( vguiButtonFrame, submenuPos[0], submenuPos[1] )
- }
-
- uiGlobal.lastMenuNavDirection = MENU_NAV_FORWARD
-
- Signal( uiGlobal.signalDummy, "ActiveMenuChanged" )
-}
-
-void function CloseSubmenu( bool openStackMenu = true )
-{
- if ( !uiGlobal.activeMenu )
- return
-
- if ( uiGlobal.activeMenu.GetType() != "submenu" )
- return
-
- CloseMenuWrapper( uiGlobal.activeMenu )
- uiGlobal.menuStack.pop()
-
- uiGlobal.lastMenuNavDirection = MENU_NAV_FORWARD
-
- if ( uiGlobal.menuStack.len() )
- {
- uiGlobal.activeMenu = uiGlobal.menuStack.top()
-
- // This runs any OnOpen function for the menu and sets focus, but doesn't actually open the menu because it is already open
- if ( openStackMenu )
- OpenMenuWrapper( uiGlobal.activeMenu, false )
- }
- else
- {
- uiGlobal.activeMenu = null
- }
-
- Signal( uiGlobal.signalDummy, "ActiveMenuChanged" )
-}
-
-void function CloseActiveMenuNoParms()
-{
- CloseActiveMenu()
-}
-
-void function CloseActiveMenu( bool cancelled = false, bool openStackMenu = true )
-{
- bool updateBlur = true
- bool wasDialog = false
-
- if ( uiGlobal.activeMenu )
- {
- if ( IsDialog( uiGlobal.activeMenu ) )
- {
- updateBlur = false
- wasDialog = true
- uiGlobal.dialogInputEnableTime = 0.0
-
- if ( uiGlobal.dialogCloseCallback )
- {
- uiGlobal.dialogCloseCallback( cancelled )
- uiGlobal.dialogCloseCallback = null
- }
- }
-
- if ( updateBlur )
- SetBlurEnabled( false )
-
- CloseMenuWrapper( uiGlobal.activeMenu )
- }
-
- uiGlobal.menuStack.pop()
- if ( uiGlobal.menuStack.len() )
- uiGlobal.activeMenu = uiGlobal.menuStack.top()
- else
- uiGlobal.activeMenu = null
-
- uiGlobal.lastMenuNavDirection = MENU_NAV_BACK
-
- if ( wasDialog )
- {
- if ( uiGlobal.activeMenu )
- SetFooterPanelVisibility( uiGlobal.activeMenu, true )
-
- if ( IsDialog( uiGlobal.activeMenu ) )
- openStackMenu = true
- else
- openStackMenu = false
- }
-
- if ( uiGlobal.activeMenu )
- {
- if ( uiGlobal.activeMenu.GetType() == "submenu" )
- {
- Hud_SetFocused( uiGlobal.menuData[ uiGlobal.activeMenu ].lastFocus )
- }
- else if ( openStackMenu )
- {
- OpenMenuWrapper( uiGlobal.activeMenu, false )
-
- if ( updateBlur && !IsLobby() && !uiGlobal.mapSupportsMenuModels )
- SetBlurEnabled( true )
- }
- }
-
- Signal( uiGlobal.signalDummy, "ActiveMenuChanged" )
-}
-
-void function CloseAllMenus()
-{
- if ( IsDialog( uiGlobal.activeMenu ) )
- CloseActiveMenu( true )
-
- if ( uiGlobal.activeMenu && uiGlobal.activeMenu.GetType() == "submenu" )
- CloseSubmenu( false )
-
- if ( uiGlobal.activeMenu )
- {
- SetBlurEnabled( false )
- CloseMenuWrapper( uiGlobal.activeMenu )
- }
-
- uiGlobal.menuStack = []
- uiGlobal.activeMenu = null
-
- uiGlobal.lastMenuNavDirection = MENU_NAV_BACK
-
- Signal( uiGlobal.signalDummy, "ActiveMenuChanged" )
-}
-
-void function CloseAllInGameMenus()
-{
- while ( uiGlobal.activeMenu )
- {
- if ( uiGlobal.activeMenu.GetType() == "submenu" )
- CloseSubmenu( false )
-
- CloseActiveMenu( true, false )
- }
-}
-
-void function CloseAllDialogs()
-{
- while ( IsDialog( uiGlobal.activeMenu ) )
- CloseActiveMenu( true )
-}
-
-void function CloseAllToTargetMenu( var targetMenu )
-{
- while ( uiGlobal.activeMenu != targetMenu )
- CloseActiveMenu( true, false )
-}
-
-void function PrintMenuStack()
-{
- array<var> stack = clone uiGlobal.menuStack
- stack.reverse()
-
- printt( "MENU STACK:" )
-
- foreach ( menu in stack )
- {
- if ( menu )
- printt( " ", Hud_GetHudName( menu ) )
- else
- printt( " null" )
- }
-}
-
-// Happens on any level load
-void function UpdateMenusOnConnect( string levelname )
-{
- EndSignal( uiGlobal.signalDummy, "LevelShutdown" ) // HACK fix because UICodeCallback_LevelInit() incorrectly runs when disconnected by client error. Test with "script_error_client" while a level is loaded.
-
- CloseAllDialogs()
-
- var mainMenu = GetMenu( "MainMenu" )
- if ( IsMenuInMenuStack( mainMenu ) && !IsMenuInMenuStack( null ) )
- CloseAllToTargetMenu( mainMenu )
-
- Assert( uiGlobal.activeMenu != null || uiGlobal.menuStack.len() == 0 )
-
- AdvanceMenu( null )
-
- // TODO: The order things are called in should be predictable so this isn't needed
- while ( !uiGlobal.mapSupportsMenuModelsUpdated )
- {
- //printt( Time(), "beginning waitframe, uiGlobal.mapSupportsMenuModelsUpdated is:", uiGlobal.mapSupportsMenuModelsUpdated )
- WaitFrame()
- //printt( Time(), "ended waitframe, uiGlobal.mapSupportsMenuModelsUpdated is:", uiGlobal.mapSupportsMenuModelsUpdated )
- }
-
- if ( IsLevelMultiplayer( levelname ) )
- {
- bool isLobby = IsLobbyMapName( levelname )
-
- if ( isLobby )
- {
- if ( IsPrivateMatch() )
- {
- AdvanceMenu( GetMenu( "PrivateLobbyMenu" ) )
- }
- else
- {
- AdvanceMenu( GetMenu( "LobbyMenu" ) )
- }
-
- thread UpdateAnnouncementDialog()
- }
- else
- {
- UI_SetPresentationType( ePresentationType.INACTIVE )
- }
- }
-}
-
-bool function IsMenuInMenuStack( var searchMenu )
-{
- foreach ( menu in uiGlobal.menuStack )
- {
- // loading a map pushes a null sentinel onto the menu stack
- if ( !menu )
- continue
-
- if ( menu == searchMenu )
- return true
- }
-
- return false
-}
-
-var function GetTopNonDialogMenu()
-{
- array<var> menuArray = clone uiGlobal.menuStack
- menuArray.reverse()
-
- foreach ( menu in menuArray )
- {
- if ( menu == null || IsDialog( menu ) )
- continue
-
- return menu
- }
-
- return null
-}
-
-void function CleanupInGameMenus()
-{
- Signal( uiGlobal.signalDummy, "CleanupInGameMenus" )
-
- CloseAllInGameMenus()
- Assert( uiGlobal.activeMenu == null )
- if ( uiGlobal.menuStack.len() )
- {
- if ( uiGlobal.loadingLevel == "" )
- CloseActiveMenu() // Disconnected. Remove stack null and open main menu.
- else
- CloseActiveMenu( true, false ) // Level to level transition. Remove stack null and DON'T open main menu.
- }
-}
-
-var function GetActiveMenu()
-{
- return uiGlobal.activeMenu
-}
-
-var function GetMenu( string menuName )
-{
- return uiGlobal.menus[ menuName ]
-}
-
-var function GetPanel( string panelName )
-{
- return uiGlobal.panels[ panelName ]
-}
-
-array<var> function GetAllMenuPanels( var menu )
-{
- array<var> menuPanels
-
- foreach ( panel in uiGlobal.allPanels )
- {
- if ( Hud_GetParent( panel ) == menu )
- menuPanels.append( panel )
- }
-
- return menuPanels
-}
-
-void function InitGamepadConfigs()
-{
- uiGlobal.buttonConfigs = [ { orthodox = "gamepad_button_layout_default.cfg", southpaw = "gamepad_button_layout_default_southpaw.cfg" } ]
- uiGlobal.buttonConfigs.append( { orthodox = "gamepad_button_layout_bumper_jumper.cfg", southpaw = "gamepad_button_layout_bumper_jumper_southpaw.cfg" } )
- uiGlobal.buttonConfigs.append( { orthodox = "gamepad_button_layout_bumper_jumper_alt.cfg", southpaw = "gamepad_button_layout_bumper_jumper_alt_southpaw.cfg" } )
- uiGlobal.buttonConfigs.append( { orthodox = "gamepad_button_layout_pogo_stick.cfg", southpaw = "gamepad_button_layout_pogo_stick_southpaw.cfg" } )
- uiGlobal.buttonConfigs.append( { orthodox = "gamepad_button_layout_button_kicker.cfg", southpaw = "gamepad_button_layout_button_kicker_southpaw.cfg" } )
- uiGlobal.buttonConfigs.append( { orthodox = "gamepad_button_layout_circle.cfg", southpaw = "gamepad_button_layout_circle_southpaw.cfg" } )
- uiGlobal.buttonConfigs.append( { orthodox = "gamepad_button_layout_ninja.cfg", southpaw = "gamepad_button_layout_ninja_southpaw.cfg" } )
- uiGlobal.buttonConfigs.append( { orthodox = "gamepad_button_layout_custom.cfg", southpaw = "gamepad_button_layout_custom.cfg" } )
-
- uiGlobal.stickConfigs = []
- uiGlobal.stickConfigs.append( "gamepad_stick_layout_default.cfg" )
- uiGlobal.stickConfigs.append( "gamepad_stick_layout_southpaw.cfg" )
- uiGlobal.stickConfigs.append( "gamepad_stick_layout_legacy.cfg" )
- uiGlobal.stickConfigs.append( "gamepad_stick_layout_legacy_southpaw.cfg" )
-
- foreach ( key, val in uiGlobal.buttonConfigs )
- {
- VPKNotifyFile( "cfg/" + val.orthodox )
- VPKNotifyFile( "cfg/" + val.southpaw )
- }
-
- foreach ( key, val in uiGlobal.stickConfigs )
- VPKNotifyFile( "cfg/" + val )
-
- ExecCurrentGamepadButtonConfig()
- ExecCurrentGamepadStickConfig()
-
- SetStandardAbilityBindingsForPilot( GetLocalClientPlayer() )
-}
-
-void function InitMenus()
-{
- InitGlobalMenuVars()
- SpShWeaponsInit()
-
- AddMenu( "MainMenu", $"resource/ui/menus/main.menu", InitMainMenu, "#MAIN" )
- AddPanel( GetMenu( "MainMenu" ), "EstablishUserPanel", InitEstablishUserPanel )
- AddPanel( GetMenu( "MainMenu" ), "MainMenuPanel", InitMainMenuPanel )
-
- // stub
- void functionref() InitModMenu = void function(){}
- AddMenu( "ModListMenu", $"resource/ui/menus/modlist.menu", InitModMenu, "#MENU_MODS" )
-
- AddMenu( "PlayVideoMenu", $"resource/ui/menus/play_video.menu", InitPlayVideoMenu )
- AddMenu( "LobbyMenu", $"resource/ui/menus/lobby.menu", InitLobbyMenu, "#LOBBY" )
-
- // stub
- void functionref() InitServerBrowserMenu = void function(){}
- AddMenu( "ServerBrowserMenu", $"resource/ui/menus/server_browser.menu", InitServerBrowserMenu, "#MENU_SERVER_BROWSER" )
-
- AddMenu( "FDMenu", $"resource/ui/menus/playlist_fd.menu", InitFDPlaylistMenu )
- AddMenu( "TeamTitanSelectMenu", $"resource/ui/menus/team_titan_select.menu", InitTeamTitanSelectMenu )
- AddMenu( "PlaylistMenu", $"resource/ui/menus/playlist.menu", InitPlaylistMenu )
- AddMenu( "PlaylistMixtapeMenu", $"resource/ui/menus/playlist_mixtape.menu", InitPlaylistMixtapeMenu )
- AddMenu( "PlaylistMixtapeChecklistMenu", $"resource/ui/menus/playlist_mixtape_checklist.menu", InitPlaylistMixtapeChecklistMenu )
-
- AddMenu( "SinglePlayerDevMenu", $"resource/ui/menus/singleplayer_dev.menu", InitSinglePlayerDevMenu, "SINGLE PLAYER DEV" )
- AddMenu( "SinglePlayerMenu", $"resource/ui/menus/singleplayer.menu", InitSinglePlayerMenu, "SINGLE PLAYER" )
-
- AddMenu( "SearchMenu", $"resource/ui/menus/search.menu", InitSearchMenu )
-
- AddMenu( "GammaMenu", $"resource/ui/menus/gamma.menu", InitGammaMenu, "#BRIGHTNESS" )
-
- AddMenu( "CommunitiesMenu", $"resource/ui/menus/community.menu", InitCommunitiesMenu )
- AddMenu( "Notifications", $"resource/ui/menus/notifications.menu", InitNotificationsMenu )
- AddMenu( "MyNetworks", $"resource/ui/menus/communities_mine.menu", InitMyNetworksMenu )
- AddMenu( "InboxFrontMenu", $"resource/ui/menus/inbox_front.menu", InitInboxFrontMenu )
- AddMenu( "Inbox", $"resource/ui/menus/inbox.menu", InitInboxMenu )
- AddMenu( "BrowseCommunities", $"resource/ui/menus/communities_browse.menu" )
- AddMenu( "CommunityEditMenu", $"resource/ui/menus/community_edit.menu" )
- AddMenu( "CommunityAdminSendMessage", $"resource/ui/menus/community_sendMessage.menu" )
- AddMenu( "CommunityAdminInviteRequestMenu", $"resource/ui/menus/community_inviteRequest.menu" )
-#if NETWORK_INVITE
- AddMenu( "InviteFriendsToNetworkMenu", $"resource/ui/menus/invite_friends.menu", InitInviteFriendsToNetworkMenu )
-#endif
-
- AddMenu( "InGameMPMenu", $"resource/ui/menus/ingame_mp.menu", InitInGameMPMenu )
- AddMenu( "InGameSPMenu", $"resource/ui/menus/ingame_sp.menu", InitInGameSPMenu )
-
- AddMenu( "Dialog", $"resource/ui/menus/dialog.menu", InitDialogMenu )
- AddMenu( "AnnouncementDialog", $"resource/ui/menus/dialog_announcement.menu", InitAnnouncementDialog )
- AddMenu( "ConnectingDialog", $"resource/ui/menus/dialog_connecting.menu", InitConnectingDialog )
- AddMenu( "DataCenterDialog", $"resource/ui/menus/dialog_datacenter.menu", InitDataCenterDialogMenu )
- AddMenu( "EULADialog", $"resource/ui/menus/dialog_eula.menu", InitEULADialog )
- AddMenu( "ReviewTermsDialog", $"resource/ui/menus/dialog_review_terms.menu", InitReviewTermsDialog )
- AddMenu( "RegistrationDialog", $"resource/ui/menus/dialog_registration.menu", InitRegistrationDialog )
- AddMenu( "AdvocateGiftDialog", $"resource/ui/menus/dialog_advocate_gift.menu", InitAdvocateGiftDialog )
-
- AddMenu( "ControlsMenu", $"resource/ui/menus/controls.menu", InitControlsMenu, "#CONTROLS" )
- AddMenu( "ControlsAdvancedLookMenu", $"resource/ui/menus/controls_advanced_look.menu", InitControlsAdvancedLookMenu, "#CONTROLS_ADVANCED_LOOK" )
- AddMenu( "GamepadLayoutMenu", $"resource/ui/menus/gamepadlayout.menu", InitGamepadLayoutMenu )
-#if PC_PROG
- AddMenu_WithCreateFunc( "MouseKeyboardBindingsMenu", $"resource/ui/menus/mousekeyboardbindings.menu", InitMouseKeyboardMenu, CreateKeyBindingMenu )
- AddMenu( "AudioMenu", $"resource/ui/menus/audio.menu", InitAudioMenu, "#AUDIO" )
- AddMenu_WithCreateFunc( "VideoMenu", $"resource/ui/menus/video.menu", InitVideoMenu, CreateVideoOptionsMenu )
-#elseif CONSOLE_PROG
- AddMenu( "AudioVideoMenu", $"resource/ui/menus/audio_video.menu", InitAudioVideoMenu, "#AUDIO_VIDEO" )
-#endif
-
- AddMenu( "AdvancedHudMenu", $"resource/ui/menus/advanced_hud.menu", InitAdvancedHudMenu, "#ADVANCED_HUD" )
-
- AddMenu( "PilotLoadoutsMenu", $"resource/ui/menus/pilotloadouts.menu", InitPilotLoadoutsMenu )
- AddMenu( "TitanLoadoutsMenu", $"resource/ui/menus/titanloadouts.menu", InitTitanLoadoutsMenu )
- AddMenu( "EditPilotLoadoutsMenu", $"resource/ui/menus/pilotloadouts.menu", InitEditPilotLoadoutsMenu )
- AddMenu( "EditTitanLoadoutsMenu", $"resource/ui/menus/titanloadouts.menu", InitEditTitanLoadoutsMenu )
- AddMenu( "EditPilotLoadoutMenu", $"resource/ui/menus/editpilotloadout.menu", InitEditPilotLoadoutMenu )
- AddMenu( "EditTitanLoadoutMenu", $"resource/ui/menus/edittitanloadout.menu", InitEditTitanLoadoutMenu )
-
- AddMenu( "SPTitanLoadoutMenu", $"resource/ui/menus/sptitanloadout.menu", InitSPTitanLoadoutMenu )
- AddMenu( "SPTitanLoadoutTutorialMenu", $"resource/ui/menus/sptitanloadout_tutorial.menu", InitSPTitanLoadoutTutorialMenu )
-
- AddMenu( "SuitSelectMenu", $"resource/ui/menus/suitselect.menu", InitSuitSelectMenu )
- AddMenu( "WeaponSelectMenu", $"resource/ui/menus/weaponselect.menu", InitWeaponSelectMenu )
- AddMenu( "CategorySelectMenu", $"resource/ui/menus/categoryselect.menu", InitCategorySelectMenu )
- AddMenu( "AbilitySelectMenu", $"resource/ui/menus/abilityselect.menu", InitAbilitySelectMenu )
- AddMenu( "PassiveSelectMenu", $"resource/ui/menus/passiveselect.menu", InitPassiveSelectMenu )
- AddSubmenu( "ModSelectMenu", $"resource/ui/menus/modselect.menu", InitModSelectMenu )
- AddMenu( "CamoSelectMenu", $"resource/ui/menus/camoselect.menu", InitCamoSelectMenu )
- AddMenu( "NoseArtSelectMenu", $"resource/ui/menus/noseartselect.menu", InitNoseArtSelectMenu )
- AddMenu( "CallsignCardSelectMenu", $"resource/ui/menus/callsigncardselect.menu", InitCallsignCardSelectMenu )
- AddMenu( "CallsignIconSelectMenu", $"resource/ui/menus/callsigniconselect.menu", InitCallsignIconSelectMenu )
- AddMenu( "BoostStoreMenu", $"resource/ui/menus/booststore.menu", InitBoostStoreMenu )
-
- AddMenu( "PrivateLobbyMenu", $"resource/ui/menus/private_lobby.menu", InitPrivateMatchMenu, "#PRIVATE_MATCH" )
- AddMenu( "MapsMenu", $"resource/ui/menus/map_select.menu", InitMapsMenu )
- AddMenu( "ModesMenu", $"resource/ui/menus/mode_select.menu", InitModesMenu )
- AddMenu( "MatchSettingsMenu", $"resource/ui/menus/match_settings.menu", InitMatchSettingsMenu )
-
- AddMenu( "Advocate_Letter", $"resource/ui/menus/advocate_letter.menu", InitAdvocateLetterMenu )
- AddMenu( "Generation_Respawn", $"resource/ui/menus/generation_respawn.menu", InitGenerationRespawnMenu )
- AddMenu( "ChallengesMenu", $"resource/ui/menus/challenges.menu", InitChallengesMenu )
-
- AddMenu( "ViewStatsMenu", $"resource/ui/menus/viewstats.menu", InitViewStatsMenu, "#PERSONAL_STATS" )
- AddMenu( "ViewStats_Overview_Menu", $"resource/ui/menus/viewstats_overview.menu", InitViewStatsOverviewMenu )
- //AddMenu( "ViewStats_Kills_Menu", $"resource/ui/menus/viewstats_kills.menu", InitViewStatsKillsMenu )
- AddMenu( "ViewStats_Time_Menu", $"resource/ui/menus/viewstats_time.menu", InitViewStatsTimeMenu )
- //AddMenu( "ViewStats_Distance_Menu", $"resource/ui/menus/viewstats_distance.menu", InitViewStatsDistanceMenu )
- AddMenu( "ViewStats_Weapons_Menu", $"resource/ui/menus/viewstats_weapons.menu", InitViewStatsWeaponsMenu )
- AddMenu( "ViewStats_Titans_Menu", $"resource/ui/menus/viewstats_titans.menu", InitViewStatsTitansMenu )
- AddMenu( "ViewStats_Misc_Menu", $"resource/ui/menus/viewstats_misc.menu", InitViewStatsMiscMenu )
- AddMenu( "ViewStats_Maps_Menu", $"resource/ui/menus/viewstats_maps.menu", InitViewStatsMapsMenu )
-
- AddMenu( "PostGameMenu", $"resource/ui/menus/postgame.menu", InitPostGameMenu )
- AddMenu( "EOG_XP", $"resource/ui/menus/eog_xp.menu", InitEOG_XPMenu )
- AddMenu( "EOG_Coins", $"resource/ui/menus/eog_coins.menu", InitEOG_CoinsMenu )
- AddMenu( "EOG_Challenges", $"resource/ui/menus/eog_challenges.menu", InitEOG_ChallengesMenu )
- AddMenu( "EOG_Unlocks", $"resource/ui/menus/eog_unlocks.menu", InitEOG_UnlocksMenu )
- AddMenu( "EOG_Scoreboard", $"resource/ui/menus/eog_scoreboard.menu", InitEOG_ScoreboardMenu )
-
- AddMenu( "CreditsMenu", $"resource/ui/menus/credits.menu", InitCreditsMenu, "#CREDITS" )
-
- AddMenu( "BurnCardMenu", $"resource/ui/menus/burn_cards.menu", InitBurnCardMenu, "#MENU_BURNCARD_MENU" )
- AddMenu( "FactionChoiceMenu", $"resource/ui/menus/faction_choice.menu", InitFactionChoiceMenu, "#FACTION_CHOICE_MENU" )
- AddMenu( "ArmoryMenu", $"resource/ui/menus/armory.menu", InitArmoryMenu, "#ARMORY_MENU" )
-
- AddMenu( "StoreMenu", $"resource/ui/menus/store.menu", InitStoreMenu, "#STORE_MENU" )
- AddMenu( "StoreMenu_NewReleases", $"resource/ui/menus/store_new_releases.menu", InitStoreMenuNewReleases, "#STORE_NEW_RELEASES" )
- AddMenu( "StoreMenu_Limited", $"resource/ui/menus/store_limited.menu", InitStoreMenuLimited, "#STORE_LIMITED" )
- AddMenu( "StoreMenu_Sales", $"resource/ui/menus/store_bundles.menu", InitStoreMenuSales, "#STORE_BUNDLES" )
- AddMenu( "StoreMenu_Titans", $"resource/ui/menus/store_prime_titans.menu", InitStoreMenuTitans, "#STORE_TITANS" ) // reusing store_prime_titans.menu
- AddMenu( "StoreMenu_PrimeTitans", $"resource/ui/menus/store_prime_titans.menu", InitStoreMenuPrimeTitans, "#STORE_PRIME_TITANS" )
- //AddMenu( "StoreMenu_WeaponSelect", $"resource/ui/menus/store_weapon_select.menu", InitStoreMenuWeaponSelect )
- //AddMenu( "StoreMenu_WeaponSkinPreview", $"resource/ui/menus/store_weapon_skin_preview.menu", InitStoreMenuWeaponSkinPreview )
- AddMenu( "StoreMenu_WeaponSkinBundles", $"resource/ui/menus/store_weapon_skin_bundles.menu", InitStoreMenuWeaponSkinBundles )
- AddMenu( "StoreMenu_WeaponSkins", $"resource/ui/menus/store_weapons.menu", InitStoreMenuWeaponSkins )
- AddMenu( "StoreMenu_Customization", $"resource/ui/menus/store_customization.menu", InitStoreMenuCustomization, "#STORE_CUSTOMIZATION_PACKS" )
- AddMenu( "StoreMenu_CustomizationPreview", $"resource/ui/menus/store_customization_preview.menu", InitStoreMenuCustomizationPreview, "#STORE_CUSTOMIZATION_PACKS" )
- AddMenu( "StoreMenu_Camo", $"resource/ui/menus/store_camo.menu", InitStoreMenuCamo, "#STORE_CAMO_PACKS" )
- AddMenu( "StoreMenu_CamoPreview", $"resource/ui/menus/store_camo_preview.menu", InitStoreMenuCamoPreview, "#STORE_CAMO_PACKS" )
- AddMenu( "StoreMenu_Callsign", $"resource/ui/menus/store_callsign.menu", InitStoreMenuCallsign, "#STORE_CALLSIGN_PACKS" )
- AddMenu( "StoreMenu_CallsignPreview", $"resource/ui/menus/store_callsign_preview.menu", InitStoreMenuCallsignPreview, "#STORE_CALLSIGN_PACKS" )
-
- AddMenu( "KnowledgeBaseMenu", $"resource/ui/menus/knowledgebase.menu", InitKnowledgeBaseMenu )
- AddMenu( "KnowledgeBaseMenuSubMenu", $"resource/ui/menus/knowledgebase_submenu.menu", InitKnowledgeBaseMenuSubMenu )
-
- AddMenu( "DevMenu", $"resource/ui/menus/dev.menu", InitDevMenu, "Dev" )
- InitSharedStartPoints()
-
- foreach ( menu in uiGlobal.allMenus )
- {
- if ( uiGlobal.menuData[ menu ].initFunc != null )
- uiGlobal.menuData[ menu ].initFunc()
-
- array<var> elems = GetElementsByClassname( menu, "TabsCommonClass" )
- if ( elems.len() )
- uiGlobal.menuData[ menu ].hasTabs = true
-
- elems = GetElementsByClassname( menu, "EnableKeyBindingIcons" )
- foreach ( elem in elems )
- Hud_EnableKeyBindingIcons( elem )
- }
-
- InitTabs()
-
- var tabbedMenu = GetMenu( "PostGameMenu" )
- AddPanel( tabbedMenu, "PVEPanel", InitPVEPanel )
- AddPanel( tabbedMenu, "SummaryPanel", InitSummaryPanel )
- AddPanel( tabbedMenu, "FDAwardsPanel", InitFDAwardsPanel )
-
- AddPanel( tabbedMenu, "ScoreboardPanel", InitScoreboardPanel )
-
- foreach ( panel in uiGlobal.allPanels )
- {
- if ( uiGlobal.panelData[ panel ].initFunc != null )
- uiGlobal.panelData[ panel ].initFunc()
- }
-
- // A little weird, but GetElementsByClassname() uses menu scope rather than parent scope.
- foreach ( menu in uiGlobal.allMenus )
- {
- array<var> buttons = GetElementsByClassname( menu, "DefaultFocus" )
- foreach ( button in buttons )
- {
- var panel = Hud_GetParent( button )
-
- //Assert( elems.len() == 1, "More than 1 panel element set as DefaultFocus!" )
- Assert( panel != null, "no parent panel found for button " + Hud_GetHudName( button ) )
- Assert( panel in uiGlobal.panelData, "panel " + Hud_GetHudName( panel ) + " isn't in uiGlobal.panelData, but button " + Hud_GetHudName( button ) + " has defaultFocus set!" )
- uiGlobal.panelData[ panel ].defaultFocus = button
- //printt( "Found DefaultFocus, button was:", Hud_GetHudName( button ), "panel was:", Hud_GetHudName( panel ) )
- }
- }
-
- InitFooterOptions()
-
- #if DEV
- if ( Dev_CommandLineHasParm( "-autoprecache_all" ) )
- {
- // repreache all levels
- ExecuteLoadingClientCommands_SetStartPoint( "sp_training" )
- ClientCommand( "map sp_training" )
- CloseAllMenus()
- }
- #endif
-}
-
-void functionref( var ) function AdvanceMenuEventHandler( var menu )
-{
- return void function( var item ) : ( menu )
- {
- if ( Hud_IsLocked( item ) )
- return
-
- AdvanceMenu( menu )
- }
-}
-
-void function PCBackButton_Activate( var button )
-{
- UICodeCallback_NavigateBack()
-}
-
-void function PCSwitchTeamsButton_Activate( var button )
-{
- ClientCommand( "PrivateMatchSwitchTeams" )
-}
-
-void function PCToggleSpectateButton_Activate( var button )
-{
- ClientCommand( "PrivateMatchToggleSpectate" )
-}
-
-void function ToggleButtonStates( var button )
-{
- for ( ;; )
- {
- Hud_SetEnabled( button, true )
- wait 1
- Hud_SetSelected( button, true )
- wait 1
- Hud_SetLocked( button, true )
- wait 1
- Hud_SetNew( button, true )
- wait 1
- Hud_SetNew( button, false )
- wait 1
- Hud_SetLocked( button, false )
- wait 1
- Hud_SetSelected( button, false )
- wait 1
- Hud_SetEnabled( button, false )
- wait 1
- }
-}
-
-void function AddMenuElementsByClassname( var menu, string classname )
-{
- array<var> elements = GetElementsByClassname( menu, classname )
-
- if ( !(classname in menu.classElements) )
- menu.classElements[classname] <- []
-
- menu.classElements[classname].extend( elements )
-}
-
-void function FocusDefault( var menu )
-{
- if (
- menu == GetMenu( "MainMenu" ) ||
- menu == GetMenu( "CategorySelectMenu" ) ||
- menu == GetMenu( "AbilitySelectMenu" ) ||
- menu == GetMenu( "PassiveSelectMenu" ) ||
- menu == GetMenu( "WeaponSelectMenu" ) ||
- menu == GetMenu( "SuitSelectMenu" ) ||
- menu == GetMenu( "CamoSelectMenu" ) ||
- menu == GetMenu( "NoseArtSelectMenu" ) ||
- menu == GetMenu( "FactionChoiceMenu" ) ||
- menu == GetMenu( "BurnCardMenu" ) ||
- menu == GetMenu( "CallsignCardSelectMenu" ) ||
- menu == GetMenu( "CallsignIconSelectMenu" ) )
- {
- }
- else
- {
- //printt( "FocusDefaultMenuItem() called" )
- FocusDefaultMenuItem( menu )
- }
-}
-
-void function SetPanelDefaultFocus( var panel, var button )
-{
- uiGlobal.panelData[ panel ].defaultFocus = button
-}
-
-void function PanelFocusDefault( var panel )
-{
- //printt( "PanelFocusDefault called" )
- if ( uiGlobal.panelData[ panel ].defaultFocus )
- {
- Hud_SetFocused( uiGlobal.panelData[ panel ].defaultFocus )
- //printt( "PanelFocusDefault if passed,", Hud_GetHudName( uiGlobal.panelData[ panel ].defaultFocus ), "focused" )
- }
-}
-
-void function SetMenuThinkFunc( var menu, void functionref() func )
-{
- Assert( uiGlobal.menuData[ menu ].thinkFunc == null )
- uiGlobal.menuData[ menu ].thinkFunc = func
-}
-
-void function AddMenuEventHandler( var menu, int event, void functionref() func )
-{
- if ( event == eUIEvent.MENU_OPEN )
- {
- Assert( uiGlobal.menuData[ menu ].openFunc == null )
- uiGlobal.menuData[ menu ].openFunc = func
- }
- else if ( event == eUIEvent.MENU_CLOSE )
- {
- Assert( uiGlobal.menuData[ menu ].closeFunc == null )
- uiGlobal.menuData[ menu ].closeFunc = func
- }
- else if ( event == eUIEvent.MENU_SHOW )
- {
- Assert( uiGlobal.menuData[ menu ].showFunc == null )
- uiGlobal.menuData[ menu ].showFunc = func
- }
- else if ( event == eUIEvent.MENU_HIDE )
- {
- Assert( uiGlobal.menuData[ menu ].hideFunc == null )
- uiGlobal.menuData[ menu ].hideFunc = func
- }
- else if ( event == eUIEvent.MENU_NAVIGATE_BACK )
- {
- Assert( uiGlobal.menuData[ menu ].navBackFunc == null )
- uiGlobal.menuData[ menu ].navBackFunc = func
- }
- else if ( event == eUIEvent.MENU_TAB_CHANGED )
- {
- Assert( uiGlobal.menuData[ menu ].tabChangedFunc == null )
- uiGlobal.menuData[ menu ].tabChangedFunc = func
- }
- else if ( event == eUIEvent.MENU_ENTITLEMENTS_CHANGED )
- {
- Assert( uiGlobal.menuData[ menu ].entitlementsChangedFunc == null )
- uiGlobal.menuData[ menu ].entitlementsChangedFunc = func
- }
- else if ( event == eUIEvent.MENU_INPUT_MODE_CHANGED )
- {
- Assert( uiGlobal.menuData[ menu ].inputModeChangedFunc == null )
- uiGlobal.menuData[ menu ].inputModeChangedFunc = func
- }
-}
-
-void function AddPanelEventHandler( var panel, int event, void functionref() func )
-{
- if ( event == eUIEvent.PANEL_SHOW )
- uiGlobal.panelData[ panel ].showFunc = func
- else if ( event == eUIEvent.PANEL_HIDE )
- uiGlobal.panelData[ panel ].hideFunc = func
-}
-
-// TODO: Get a real on open event from code?
-void function OpenMenuWrapper( var menu, bool focusDefault )
-{
- OpenMenu( menu )
- printt( Hud_GetHudName( menu ), "menu opened" )
-
- Assert( menu in uiGlobal.menuData )
- if ( uiGlobal.menuData[ menu ].openFunc != null )
- {
- thread uiGlobal.menuData[ menu ].openFunc()
- //printt( "Called openFunc for:", menu.GetHudName() )
- }
-
- if ( focusDefault )
- FocusDefault( menu )
-
- //UpdateMenuTabs()
- UpdateFooterOptions()
-}
-
-void function CloseMenuWrapper( var menu )
-{
- CloseMenu( menu )
- printt( Hud_GetHudName( menu ), "menu closed" )
-
- Assert( menu in uiGlobal.menuData )
- if ( uiGlobal.menuData[ menu ].closeFunc != null )
- {
- thread uiGlobal.menuData[ menu ].closeFunc()
- //printt( "Called closeFunc for:", Hud_GetHudName( menu ) )
- }
-}
-
-bool function IsLevelMultiplayer( string levelname )
-{
- return levelname.find( "mp_" ) == 0
-}
-
-void function AddButtonEventHandler( var button, int event, void functionref( var ) func )
-{
- Hud_AddEventHandler( button, event, func )
-}
-
-void function AddEventHandlerToButton( var menu, string buttonName, int event, void functionref( var ) func )
-{
- var button = Hud_GetChild( menu, buttonName )
- Hud_AddEventHandler( button, event, func )
-}
-
-void function AddEventHandlerToButtonClass( var menu, string classname, int event, void functionref( var ) func )
-{
- array<var> buttons = GetElementsByClassname( menu, classname )
-
- foreach ( button in buttons )
- {
- //printt( "button name:", Hud_GetHudName( button ) )
- Hud_AddEventHandler( button, event, func )
- }
-}
-
-// Added slight delay to main menu music to work around a hitch caused when the game first starts up
-void function PlayMusicAfterDelay()
-{
- wait MAINMENU_MUSIC_DELAY
- if ( uiGlobal.playingMusic )
- EmitUISound( "MainMenu_Music" )
-}
-
-void function DisableMusic()
-{
- EmitUISound( "Movie_MuteAllGameSound" )
-}
-
-void function EnableMusic()
-{
- StopUISoundByName( "Movie_MuteAllGameSound" )
-}
-
-void function PlayMusic()
-{
- if ( !uiGlobal.playingMusic && !uiGlobal.playingVideo && !uiGlobal.playingCredits )
- {
- //printt( "PlayMusic() called. Playing: MainMenu_Music. uiGlobal.playingMusic:", uiGlobal.playingMusic, "uiGlobal.playingVideo:", uiGlobal.playingVideo, "uiGlobal.playingCredits:", uiGlobal.playingCredits )
- uiGlobal.playingMusic = true
- thread PlayMusicAfterDelay()
- }
- else
- {
- //printt( "PlayMusic() called, but doing nothing. uiGlobal.playingMusic:", uiGlobal.playingMusic, "uiGlobal.playingVideo:", uiGlobal.playingVideo, "uiGlobal.playingCredits:", uiGlobal.playingCredits )
- }
-}
-
-void function StopMusic()
-{
- //printt( "StopMusic() called. Stopping: MainMenu_Music" )
- StopUISound( "MainMenu_Music" )
- uiGlobal.playingMusic = false
-}
-
-void function RegisterMenuVarInt( string varName, int value )
-{
- table<string, int> intVars = uiGlobal.intVars
-
- Assert( !( varName in intVars ) )
-
- intVars[varName] <- value
-}
-
-void function RegisterMenuVarBool( string varName, bool value )
-{
- table<string, bool> boolVars = uiGlobal.boolVars
-
- Assert( !( varName in boolVars ) )
-
- boolVars[varName] <- value
-}
-
-void function RegisterMenuVarVar( string varName, var value )
-{
- table<string, var> varVars = uiGlobal.varVars
-
- Assert( !( varName in varVars ) )
-
- varVars[varName] <- value
-}
-
-int function GetMenuVarInt( string varName )
-{
- table<string, int> intVars = uiGlobal.intVars
-
- Assert( varName in intVars )
-
- return intVars[varName]
-}
-
-bool function GetMenuVarBool( string varName )
-{
- table<string, bool> boolVars = uiGlobal.boolVars
-
- Assert( varName in boolVars )
-
- return boolVars[varName]
-}
-
-var function GetMenuVarVar( string varName )
-{
- table<string, var> varVars = uiGlobal.varVars
-
- Assert( varName in varVars )
-
- return varVars[varName]
-}
-
-void function SetMenuVarInt( string varName, int value )
-{
- table<string, int> intVars = uiGlobal.intVars
-
- Assert( varName in intVars )
-
- if ( intVars[varName] == value )
- return
-
- intVars[varName] = value
-
- table<string, array<void functionref()> > varChangeFuncs = uiGlobal.varChangeFuncs
-
- if ( varName in varChangeFuncs )
- {
- foreach ( func in varChangeFuncs[varName] )
- {
- //printt( varName, "changed, calling changeFunc:", string( func ) )
- func()
- }
- }
-}
-
-void function SetMenuVarBool( string varName, bool value )
-{
- table<string, bool> boolVars = uiGlobal.boolVars
-
- Assert( varName in boolVars )
-
- if ( boolVars[varName] == value )
- return
-
- boolVars[varName] = value
-
- table<string, array<void functionref()> > varChangeFuncs = uiGlobal.varChangeFuncs
-
- if ( varName in varChangeFuncs )
- {
- foreach ( func in varChangeFuncs[varName] )
- {
- //printt( varName, "changed, calling changeFunc:", string( func ) )
- func()
- }
- }
-}
-
-void function SetMenuVarVar( string varName, var value )
-{
- table<string, var> varVars = uiGlobal.varVars
-
- Assert( varName in varVars )
-
- if ( varVars[varName] == value )
- return
-
- varVars[varName] = value
-
- table<string, array<void functionref()> > varChangeFuncs = uiGlobal.varChangeFuncs
-
- if ( varName in varChangeFuncs )
- {
- foreach ( func in varChangeFuncs[varName] )
- {
- //printt( varName, "changed, calling changeFunc:", string( func ) )
- func()
- }
- }
-}
-
-void function AddMenuVarChangeHandler( string varName, void functionref() func )
-{
- table<string, array<void functionref()> > varChangeFuncs = uiGlobal.varChangeFuncs
-
- if ( !( varName in varChangeFuncs ) )
- varChangeFuncs[varName] <- []
-
- // TODO: Verify we're not duplicating an existing func
- varChangeFuncs[varName].append( func )
-}
-
-// These are common menu statuses that trigger menu logic any time they change
-// They should become code callbacks, so script doesn't poll
-void function InitGlobalMenuVars()
-{
- RegisterMenuVarVar( "focus", null )
- RegisterMenuVarBool( "isConnected", false )
- RegisterMenuVarBool( "isFullyConnected", false )
- RegisterMenuVarBool( "isPartyLeader", false )
- RegisterMenuVarBool( "isPrivateMatch", false )
- RegisterMenuVarBool( "isGamepadActive", IsControllerModeActive() )
-
- #if CONSOLE_PROG
- RegisterMenuVarBool( "CONSOLE_isOnline", false )
- RegisterMenuVarBool( "CONSOLE_isSignedIn", false )
- #endif // CONSOLE_PROG
-
- #if DURANGO_PROG
- RegisterMenuVarBool( "DURANGO_isGameFullyInstalled", false )
- RegisterMenuVarBool( "DURANGO_canInviteFriends", false )
- RegisterMenuVarBool( "DURANGO_isJoinable", false )
- #elseif PS4_PROG
- RegisterMenuVarBool( "PS4_canInviteFriends", false)
- #elseif PC_PROG
- RegisterMenuVarBool( "ORIGIN_isEnabled", false )
- RegisterMenuVarBool( "ORIGIN_isJoinable", false )
- #endif
-
- thread UpdateFocus()
- thread UpdateIsConnected()
- thread UpdateIsFullyConnected()
- thread UpdateAmIPartyLeader()
- thread UpdateIsPrivateMatch()
- thread UpdateActiveMenuThink()
-
- #if CONSOLE_PROG
- thread UpdateConsole_IsOnline()
- thread UpdateConsole_IsSignedIn()
- #endif // CONSOLE_PROG
-
- #if DURANGO_PROG
- thread UpdateDurango_IsGameFullyInstalled()
- thread UpdateDurango_CanInviteFriends()
- thread UpdateDurango_IsJoinable()
- #elseif PS4_PROG
- thread UpdatePS4_CanInviteFriends()
- #elseif PC_PROG
- thread UpdateOrigin_IsEnabled()
- thread UpdateOrigin_IsJoinable()
- thread UpdateIsGamepadActive()
- #endif
-}
-
-void function UpdateFocus()
-{
- while ( true )
- {
- SetMenuVarVar( "focus", GetFocus() )
- WaitFrame()
- }
-}
-
-void function UpdateActiveMenuThink()
-{
- while ( true )
- {
- var menu = GetActiveMenu()
- if ( menu )
- {
- Assert( menu in uiGlobal.menuData )
- if ( uiGlobal.menuData[ menu ].thinkFunc != null )
- uiGlobal.menuData[ menu ].thinkFunc()
- }
-
- WaitFrame()
- }
-}
-
-void function UpdateIsConnected()
-{
- while ( true )
- {
- SetMenuVarBool( "isConnected", IsConnected() )
- WaitFrame()
- }
-}
-
-void function UpdateIsFullyConnected()
-{
- while ( true )
- {
- SetMenuVarBool( "isFullyConnected", IsFullyConnected() )
- WaitFrame()
- }
-}
-
-void function UpdateAmIPartyLeader()
-{
- while ( true )
- {
- SetMenuVarBool( "isPartyLeader", AmIPartyLeader() )
- WaitFrame()
- }
-}
-
-void function UpdateIsPrivateMatch()
-{
- while ( true )
- {
- SetMenuVarBool( "isPrivateMatch", IsPrivateMatch() )
- WaitFrame()
- }
-}
-
-#if CONSOLE_PROG
- void function UpdateConsole_IsOnline()
- {
- while ( true )
- {
- SetMenuVarBool( "CONSOLE_isOnline", Console_IsOnline() )
- WaitFrame()
- }
- }
-
- void function UpdateConsole_IsSignedIn()
- {
- while ( true )
- {
- SetMenuVarBool( "CONSOLE_isSignedIn", Console_IsSignedIn() )
- WaitFrame()
- }
- }
-#endif // CONSOLE_PROG
-
-
-#if PS4_PROG
- void function UpdatePS4_CanInviteFriends()
- {
- while ( true )
- {
- SetMenuVarBool( "PS4_canInviteFriends", PS4_canInviteFriends() )
- WaitFrame()
- }
- }
-#endif // PS4_PROG
-
-
-
-#if DURANGO_PROG
- void function UpdateDurango_IsGameFullyInstalled()
- {
- while ( true )
- {
- SetMenuVarBool( "DURANGO_isGameFullyInstalled", IsGameFullyInstalled() )
- wait 1 // Poll less frequent
- }
- }
-
- void function UpdateDurango_CanInviteFriends()
- {
- while ( true )
- {
- SetMenuVarBool( "DURANGO_canInviteFriends", Durango_CanInviteFriends() )
- WaitFrame()
- }
- }
-
- void function UpdateDurango_IsJoinable()
- {
- while ( true )
- {
- SetMenuVarBool( "DURANGO_isJoinable", Durango_IsJoinable() )
- WaitFrame()
- }
- }
-#endif // DURANGO_PROG
-
-#if PC_PROG
- void function UpdateOrigin_IsEnabled()
- {
- while ( true )
- {
- SetMenuVarBool( "ORIGIN_isEnabled", Origin_IsEnabled() )
- WaitFrame()
- }
- }
-
- void function UpdateOrigin_IsJoinable()
- {
- while ( true )
- {
- SetMenuVarBool( "ORIGIN_isJoinable", Origin_IsJoinable() )
- WaitFrame()
- }
- }
-
- void function UpdateIsGamepadActive()
- {
- while ( true )
- {
- SetMenuVarBool( "isGamepadActive", IsControllerModeActive() )
- WaitFrame()
- }
- }
-#endif // PC_PROG
-
-void function InviteFriends( var button )
-{
- //AdvanceMenu( GetMenu( "InviteFriendsToPartyMenu" ) )
-
- #if DURANGO_PROG
- Durango_InviteFriends()
- #elseif PS4_PROG
- ClientCommand("session_debug_invite");
- #elseif PC_PROG
- Assert( Origin_IsEnabled() )
- Assert( Origin_IsJoinable() )
-
- Origin_ShowInviteFriendsDialog()
- #endif
-}
-
-#if DURANGO_PROG
-void function OpenXboxPartyApp( var button )
-{
- Durango_OpenPartyApp()
-}
-
-void function OpenXboxHelp( var button )
-{
- Durango_ShowHelpWindow()
-}
-#endif // DURANGO_PROG
-
-void function OpenReviewTermsDialog( var button )
-{
- AdvanceMenu( GetMenu( "ReviewTermsDialog" ) )
-}
-
-void function OpenErrorDialog( string errorDetails )
-{
- DialogData dialogData
- dialogData.header = "#ERROR"
- dialogData.message = errorDetails
- dialogData.image = $"ui/menu/common/dialog_error"
-
-#if PC_PROG
- AddDialogButton( dialogData, "#DISMISS" )
-
- AddDialogFooter( dialogData, "#A_BUTTON_SELECT" )
-#endif // PC_PROG
- AddDialogFooter( dialogData, "#B_BUTTON_DISMISS_RUI" )
-
- while ( uiGlobal.activeMenu != GetMenu( "MainMenu" ) )
- {
- WaitSignal( uiGlobal.signalDummy, "OpenErrorDialog", "ActiveMenuChanged" )
- }
-
- OpenDialog( dialogData )
-}
-
-bool function IsDialog( var menu )
-{
- if ( menu == null )
- return false
-
- return uiGlobal.menuData[ menu ].isDialog
-}
-
-bool function IsDialogActive( DialogData dialogData )
-{
- if ( !IsDialog( uiGlobal.activeMenu ) )
- return false
-
- return uiGlobal.menuData[ uiGlobal.activeMenu ].dialogData == dialogData
-}
-
-bool function IsDialogOnlyActiveMenu()
-{
- if ( !IsDialog( uiGlobal.activeMenu ) )
- return false
-
- int stackLen = uiGlobal.menuStack.len()
- if ( stackLen < 1 )
- return false
-
- if ( uiGlobal.menuStack[stackLen - 1] != uiGlobal.activeMenu )
- return false
-
- if ( stackLen == 1 )
- return true
-
- if ( uiGlobal.menuStack[stackLen - 2] == null )
- return true
-
- return false
-}
-
-void function SetNavUpDown( array<var> buttons, var wrap = true )
-{
- Assert( buttons.len() > 0 )
-
- var first = buttons[0]
- var last = buttons[buttons.len() - 1]
- var prev
- var next
- var button
-
- for ( int i = 0; i < buttons.len(); i++ )
- {
- button = buttons[i]
-
- if ( button == first )
- prev = last
- else
- prev = buttons[i - 1]
-
- if ( button == last )
- next = first
- else
- next = buttons[i + 1]
-
- button.SetNavUp( prev )
- button.SetNavDown( next )
-
- //printt( "SetNavUP for:", Hud_GetHudName( button ), "to:", Hud_GetHudName( prev ) )
- //printt( "SetNavDown for:", Hud_GetHudName( button ), "to:", Hud_GetHudName( next ) )
- }
-}
-
-void function SetNavLeftRight( array<var> buttons, var wrap = true )
-{
- Assert( buttons.len() > 0 )
-
- var first = buttons[0]
- var last = buttons[buttons.len() - 1]
- var prev
- var next
- var button
-
- for ( int i = 0; i < buttons.len(); i++ )
- {
- button = buttons[i]
-
- if ( button == first )
- prev = last
- else
- prev = buttons[i - 1]
-
- if ( button == last )
- next = first
- else
- next = buttons[i + 1]
-
- button.SetNavLeft( prev )
- button.SetNavRight( next )
-
- //printt( "SetNavUP for:", Hud_GetHudName( button ), "to:", Hud_GetHudName( prev ) )
- //printt( "SetNavDown for:", Hud_GetHudName( button ), "to:", Hud_GetHudName( next ) )
- }
-}
-
-void function UICodeCallback_EntitlementsChanged()
-{
- if ( uiGlobal.activeMenu == null )
- return
-
- if ( uiGlobal.menuData[ uiGlobal.activeMenu ].entitlementsChangedFunc != null )
- thread uiGlobal.menuData[ uiGlobal.activeMenu ].entitlementsChangedFunc()
-}
-
-#if PC_PROG
-void function QuitGame()
-{
- ClientCommand( "quit" )
-}
-#endif
-
-void function UICodeCallback_StoreTransactionCompleted()
-{
- // this callback is only supported and needed on PS4 currently
-#if PS4_PROG
- if ( InStoreMenu() )
- OnOpenDLCStore()
-#endif
-}
-
-void function UICodeCallback_GamePurchased()
-{
- // this callback is only supported and needed on PC currently
-#if PC_PROG
- DialogData dialogData
- dialogData.header = "#PURCHASE_GAME_COMPLETE"
- dialogData.message = "#PURCHASE_GAME_RESTART"
- AddDialogButton( dialogData, "#QUIT", QuitGame )
-
- OpenDialog( dialogData )
-#endif
-}
-
-bool function IsTrialPeriodActive()
-{
- return GetConVarBool( "trialPeriodIsActive" )
-}
-
-void function LaunchGamePurchaseOrDLCStore( array<string> menuNames = [ "StoreMenu" ] )
-{
- if ( Script_IsRunningTrialVersion() )
- {
- LaunchGamePurchase()
- }
- else
- {
- void functionref() preOpenFunc = null
-
- foreach ( menuName in menuNames )
- {
- // Special case because this menu needs a few properties set before opening
- if ( menuName == "StoreMenu_WeaponSkins" )
- {
- preOpenFunc = DefaultToDLC11WeaponWarpaintBundle
- break
- }
- }
-
- OpenStoreMenu( menuNames, preOpenFunc )
- }
-}
-
-void function UICodeCallback_PartyUpdated()
-{
- if ( AmIPartyLeader() )
- {
- string activeSearchingPlaylist = GetActiveSearchingPlaylist()
- if ( activeSearchingPlaylist != "" && !CanPlaylistFitMyParty( activeSearchingPlaylist ) )
- {
- CancelMatchSearch()
-
- DialogData dialogData
- dialogData.header = "#MATCHMAKING_CANCELED"
- dialogData.message = "#MATCHMAKING_CANCELED_REASON_PARTY_SIZE"
- AddDialogButton( dialogData, "#OK" )
-
- OpenDialog( dialogData )
- }
- }
-}
-
-
-void function HACK_DelayedSetFocus_BecauseWhy( var item )
-{
- wait 0.1
- if ( IsValid( item ) )
- Hud_SetFocused( item )
-}
-
-void function ClassicMusic_OnChange( var button )
-{
- bool isEnabled = GetConVarBool( "sound_classic_music" )
-
- if ( IsFullyConnected() && IsMultiplayer() && GetUIPlayer() )
- {
- if ( IsItemLocked( GetUIPlayer(), "classic_music" ) )
- SetConVarBool( "sound_classic_music", false )
-
- if ( IsLobby() )
- thread RunClientScript( "OnSoundClassicMusicChanged" )
- }
-}
-
-bool function IsClassicMusicAvailable()
-{
- bool classicMusicAvailable = false
- if ( IsFullyConnected() && IsMultiplayer() && GetUIPlayer() )
- classicMusicAvailable = !IsItemLocked( GetUIPlayer(), "classic_music" )
-
- return classicMusicAvailable
-}
-
-void function UICodeCallback_KeyBindOverwritten( string key, string oldbinding, string newbinding )
-{
- DialogData dialogData
- dialogData.header = Localize( "#MENU_KEYBIND_WAS_BEING_USED", key )
- dialogData.message = Localize( "#MENU_KEYBIND_WAS_BEING_USED_SUB", key, Localize( oldbinding ) )
-
- AddDialogButton( dialogData, "#OK" )
-
- OpenDialog( dialogData )
-} \ No newline at end of file
diff --git a/Northstar.Client/scripts/vscripts/ui/menu_main.nut b/Northstar.Client/scripts/vscripts/ui/menu_main.nut
deleted file mode 100644
index 6ffd0d3a3..000000000
--- a/Northstar.Client/scripts/vscripts/ui/menu_main.nut
+++ /dev/null
@@ -1,608 +0,0 @@
-global function InitMainMenu
-global function EULA_Dialog
-global function UpdateDataCenterFooter
-global function LaunchGamePurchase
-global function SP_Trial_LaunchGamePurchase
-global function LaunchSPNew
-global function LaunchSPContinue
-global function LaunchSPMissionSelect
-global function LaunchMP
-global function LaunchGame
-global function LaunchSPTrialMission
-global function GetUserSignInState
-
-struct
-{
- var menu
- var versionDisplay
- var trialLabel
-} file
-
-
-void function InitMainMenu()
-{
- RegisterSignal( "EndOnMainMenu_Open" )
-
- var menu = GetMenu( "MainMenu" )
- file.menu = menu
-
- AddMenuEventHandler( menu, eUIEvent.MENU_OPEN, OnMainMenu_Open )
- AddMenuEventHandler( menu, eUIEvent.MENU_NAVIGATE_BACK, OnMainMenu_NavigateBack )
-
- var titleRui = Hud_GetRui( Hud_GetChild( file.menu, "TitleRui" ) )
- RuiSetImage( titleRui, "basicImage", $"rui/menu/main_menu/title")
-
- file.versionDisplay = Hud_GetChild( menu, "versionDisplay" )
- file.trialLabel = Hud_GetChild( menu, "TrialLabel" )
-
- #if CONSOLE_PROG
- AddMenuFooterOption( menu, BUTTON_A, "#A_BUTTON_SELECT", "", null, IsConsoleSignedIn )
- #if DURANGO_PROG
- AddMenuFooterOption( menu, BUTTON_B, "#B_BUTTON_SWITCH_PROFILE", "", null, IsConsoleSignedIn )
- #endif // DURANGO_PROG
-
- AddMenuVarChangeHandler( "CONSOLE_isSignedIn", UpdateFooterOptions )
- #endif // CONSOLE_PROG
-
- #if PC_PROG
- AddMenuFooterOption( menu, BUTTON_A, "#A_BUTTON_SELECT", "" )
- #endif // PC_PROG
-
- AddMenuFooterOption( menu, BUTTON_X, "#X_BUTTON_INBOX_ACCEPT", "#INBOX_ACCEPT", OpenDataCenterDialog, IsDataCenterFooterValid, UpdateDataCenterFooter )
- AddMenuFooterOption( menu, BUTTON_Y, "#Y_MENU_TITLE_MODS", "#MENU_TITLE_MODS", void function( var button ) { AdvanceMenu( GetMenu( "ModListMenu" ) ) } )
-#if DEV
- if ( DevStartPoints() )
- AddMenuFooterOption( menu, BUTTON_Y, "#Y_BUTTON_DEV_MENU", "#DEV_MENU", OpenSinglePlayerDevMenu )
-#endif // DEV
-}
-
-#if CONSOLE_PROG
- bool function IsConsoleSignedIn()
- {
- return ( GetMenuVarBool( "CONSOLE_isSignedIn" ) )
- }
-#endif // CONSOLE_PROG
-
-void function OnMainMenu_Open()
-{
- Signal( uiGlobal.signalDummy, "EndOnMainMenu_Open" )
- EndSignal( uiGlobal.signalDummy, "EndOnMainMenu_Open" )
-
- UpdatePromoData() // On script restarts this gives us the last data until the new request is complete
- RequestMainMenuPromos() // This will be ignored if there was a recent request. "infoblock_requestInterval"
-
- TryUnlockCollectiblesAchievement()
- TryUnlockCompletedGameAchievements()
-
- Hud_SetText( file.versionDisplay, GetPublicGameVersion() )
- Hud_Show( file.versionDisplay )
-
- thread UpdateTrialLabel()
-
-#if PC_PROG
- ActivatePanel( GetPanel( "MainMenuPanel" ) )
- return
-#endif // PC_PROG
-
- int state
- int lastState = -1
- var panel
- var lastPanel
-
- while ( GetTopNonDialogMenu() == file.menu )
- {
- state = GetUserSignInState()
-
- if ( state != lastState )
- {
- if ( state == userSignInState.SIGNED_IN )
- panel = GetPanel( "MainMenuPanel" )
- else
- panel = GetPanel( "EstablishUserPanel" )
-
- if ( panel != lastPanel )
- {
- ActivatePanel( panel )
- lastPanel = panel
- }
- }
-
- lastState = state
-
- WaitFrame()
- }
-}
-
-void function ActivatePanel( var panel )
-{
- Assert( panel != null )
-
- array<var> elems = GetElementsByClassname( file.menu, "MainMenuPanelClass" )
- foreach ( elem in elems )
- {
- if ( elem != panel && Hud_IsVisible( elem ) )
- HidePanel( elem )
- }
-
- ShowPanel( panel )
-}
-
-void function OnMainMenu_NavigateBack()
-{
-#if DURANGO_PROG
- Durango_ShowAccountPicker()
-#endif // DURANGO_PROG
-}
-
-int function GetUserSignInState()
-{
-#if DURANGO_PROG
- if ( Durango_InErrorScreen() )
- {
- return userSignInState.ERROR
- }
- else if ( Durango_IsSigningIn() )
- {
- return userSignInState.SIGNING_IN
- }
- else if ( !Console_IsSignedIn() && !Console_SkippedSignIn() )
- {
- //printt( "Console_IsSignedIn():", Console_IsSignedIn(), "Console_SkippedSignIn:", Console_SkippedSignIn() )
- return userSignInState.SIGNED_OUT
- }
-
- Assert( Console_IsSignedIn() || Console_SkippedSignIn() )
-#endif
- return userSignInState.SIGNED_IN
-}
-
-void function UpdateDataCenterFooter( InputDef data )
-{
- EndSignal( uiGlobal.signalDummy, "EndFooterUpdateFuncs" )
-
- int index = int( Hud_GetScriptID( data.vguiElem ) )
- int ping
- string name
-
- while ( data.conditionCheckFunc() )
- {
- ping = GetDatacenterPing()
- name = GetDatacenterName()
-
- if ( ping > 0 )
- {
- if ( IsControllerModeActive() )
- SetFooterText( file.menu, index, Localize( "#X_BUTTON_DATACENTER_INFO", name, ping ) )
- else
- SetFooterText( file.menu, index, Localize( "#DATACENTER_INFO", name, ping ) )
- }
- else
- {
- if ( IsControllerModeActive() )
- SetFooterText( file.menu, index, "#X_BUTTON_DATACENTER_CALCULATING" )
- else
- SetFooterText( file.menu, index, "#DATACENTER_CALCULATING" )
- }
-
- WaitFrame()
- }
-}
-
-bool function IsDataCenterFooterValid()
-{
- #if PC_PROG
- return ( uiGlobal.activeMenu == file.menu )
- #else
- return ( uiGlobal.activeMenu == file.menu ) && Console_IsOnline() && Console_IsSignedIn()
- #endif
-}
-
-void function SP_Trial_LaunchGamePurchase()
-{
- Disconnect()
- LaunchGamePurchase()
-}
-
-void function LaunchGamePurchase()
-{
- ShowGamePurchaseStore()
-}
-
-void function LaunchSPNew()
-{
- uiGlobal.launching = eLaunching.SINGLEPLAYER_NEW
- LaunchGame()
-}
-
-void function LaunchSPContinue()
-{
- uiGlobal.launching = eLaunching.SINGLEPLAYER_CONTINUE
- LaunchGame()
-}
-
-void function LaunchSPMissionSelect()
-{
- uiGlobal.launching = eLaunching.SINGLEPLAYER_MISSION_SELECT
- LaunchGame()
-}
-
-void function LaunchSPTrialMission()
-{
- uiGlobal.launching = eLaunching.SINGLEPLAYER_MISSION_SELECT
- SPTrialMission_Start()
-}
-
-void function LaunchMP()
-{
- uiGlobal.launching = eLaunching.MULTIPLAYER
- LaunchGame()
-}
-
-void function LaunchGame()
-{
- Assert( uiGlobal.launching == eLaunching.SINGLEPLAYER_NEW ||
- uiGlobal.launching == eLaunching.SINGLEPLAYER_CONTINUE ||
- uiGlobal.launching == eLaunching.SINGLEPLAYER_MISSION_SELECT ||
- uiGlobal.launching == eLaunching.MULTIPLAYER ||
- uiGlobal.launching == eLaunching.MULTIPLAYER_INVITE )
-
- if ( uiGlobal.activeMenu == GetMenu( "PlayVideoMenu" ) )
- {
- SetVideoCompleteFunc( null )
- CloseActiveMenu()
- }
-
- if ( !IsGamePartiallyInstalled() )
- {
- DoGameNeedsToInstallDialog()
- return
- }
-
- // Because accepting an invite tries to launch the game we need this here
- if ( !IsGameFullyInstalled() )
- {
- printt( "Game is not fully installed." )
-
- if ( uiGlobal.launching == eLaunching.SINGLEPLAYER_CONTINUE )
- {
- string saveName = GetSaveName()
- string mapName = SaveGame_GetMapName( saveName )
- int startPointIndex = SaveGame_GetStartPoint( saveName )
-
- printt( mapName )
- printt( startPointIndex )
-
- bool isInTraining = (mapName == "sp_training" && startPointIndex < 5) // "Titanfall" start point
-
- if ( !isInTraining )
- {
- DoGameNeedsToInstallDialog()
- return
- }
-
- printt( "Allowing 'continue' option to load into training." )
- }
- else if ( uiGlobal.launching != eLaunching.SINGLEPLAYER_NEW )
- {
- DoGameNeedsToInstallDialog()
- return
- }
- }
-
- #if CONSOLE_PROG
- if ( !Console_IsSignedIn() )
- {
- printt( "Not signed in." )
- return
- }
-
- if ( GetEULAVersionAccepted() < 1 ) // Treat as binary for now, as discussed with Preston.
- {
- if ( uiGlobal.activeMenu == GetMenu( "EULADialog" ) )
- return
-
- if ( IsDialog( uiGlobal.activeMenu ) )
- CloseActiveMenu( true )
-
- EULA_Dialog()
- return
- }
-
- if ( Nucleus_GetState() == NUCLEUS_STATE_INACTIVE )
- Nucleus_Login()
-
- if ( !uiGlobal.triedNucleusRegistration && uiGlobal.launching == eLaunching.MULTIPLAYER && !Nucleus_GetSkipRegistration() )
- {
- uiGlobal.triedNucleusRegistration = true
- thread Nucleus_HandleLoginResponse()
- return
- }
-
- if ( !GetConVarBool( "gamma_adjusted" ) )
- {
- if ( IsDialog( uiGlobal.activeMenu ) )
- CloseActiveMenu( true )
-
- AdvanceMenu( GetMenu( "GammaMenu" ) )
- return
- }
- #endif // CONSOLE_PROG
-
- if ( ( uiGlobal.launching == eLaunching.MULTIPLAYER || uiGlobal.launching == eLaunching.MULTIPLAYER_INVITE ) && !IsAdvocateGiftComplete() )
- {
- if ( IsDialog( uiGlobal.activeMenu ) )
- CloseActiveMenu( true )
-
- AdvanceMenu( GetMenu( "AdvocateGiftDialog" ) )
- return
- }
-
- SetMenuWasMultiplayerPlayedLast( true )
- if ( uiGlobal.launching == eLaunching.SINGLEPLAYER_NEW )
- NewGameSelected()
- else if ( uiGlobal.launching == eLaunching.SINGLEPLAYER_CONTINUE )
- LoadLastCheckpoint()
- else if ( uiGlobal.launching == eLaunching.SINGLEPLAYER_MISSION_SELECT )
- AdvanceMenu( GetMenu( "SinglePlayerMenu" ) )
- else
- thread StartSearchForPartyServer()
-
- uiGlobal.launching = eLaunching.FALSE
-}
-
-void function StartSearchForPartyServer()
-{
- printt( "StartSearchForPartyServer" )
-
-#if DURANGO_PROG
- // IMPORTANT: As a safety measure leave any party view we are in at this point.
- // Otherwise, if you are unlucky enough to get stuck in a party view, you will
- // trash its state by pointing it to your private lobby.
- Durango_LeaveParty()
-
- // IMPORTANT: It's possible that you have permission to play multiplayer
- // because your friend is signed in with his gold account on your machine,
- // but once that guy signs out, you shouldn't be able to play like you have
- // xboxlive gold anymore. To fix this, we need to check permissions periodically.
- // One of the places where we do this periodic check is when you press "PLAY"
- printt( "Durango - verifying MP permissions" )
- if ( !Console_HasPermissionToPlayMultiplayer() )
- Durango_VerifyMultiplayerPermissions()
-#endif // DURANGO_PROG
-
- Signal( uiGlobal.signalDummy, "OnCancelConnect" )
- EndSignal( uiGlobal.signalDummy, "OnCancelConnect" )
-
- if ( IsDialog( uiGlobal.activeMenu ) )
- CloseActiveMenu( true )
- OpenConnectingDialog()
-
- Hud_SetText( uiGlobal.ConfirmMenuMessage, "" )
- Hud_SetText( uiGlobal.ConfirmMenuErrorCode, "" )
-
- Hud_Show( uiGlobal.ConfirmMenuMessage )
- Hud_Show( uiGlobal.ConfirmMenuErrorCode )
-
-#if DURANGO_PROG
- if( !Console_IsOnline() )
- {
- printt( "Durango - finding empty party server failed - not online" )
- Hud_SetText( uiGlobal.ConfirmMenuMessage, "#DURANGO_NOT_ONLINE" )
- return
- }
-#endif // DURANGO_PROG
-
-#if PS4_PROG
- if( !Console_IsOnline() )
- {
- printt( "PS4 - finding empty party server failed - not online" )
- Hud_SetText( uiGlobal.ConfirmMenuMessage, "#INTERNET_NOT_FOUND" )
- return
- }
-
- if ( PS4_isNetworkingDown() )
- {
- printt( "PS4 - finding empty party server failed - networking is down" )
- Hud_SetText( uiGlobal.ConfirmMenuMessage, "#PSN_CANNOT_CONNECT" )
- return
- }
-
- if( !PS4_isUserNetworkingEnabled() )
- {
- Hud_SetText( uiGlobal.ConfirmMenuMessage, "#PSN_CHECKING_USABILITY" )
- PS4_ScheduleUserNetworkingEnabledTest()
- WaitFrame()
-
- if( !PS4_isUserNetworkingResolved() )
- {
- printt( "PS4 - finding empty party server stalled - networking isn't resolved yet" )
- // offer cancel ??
- while( !PS4_isUserNetworkingResolved())
- WaitFrame()
- }
-
- if( PS4_getUserNetworkingResolution() == PS4_NETWORK_STATUS_NOT_LOGGED_IN )
- {
- Hud_SetText( uiGlobal.ConfirmMenuErrorCode, string(PS4_getUserNetworkingErrorStatus()) )
- Hud_SetText( uiGlobal.ConfirmMenuMessage, "#PSN_LOGIN" )
-
- Ps4_LoginDialog_Schedule()
- while( Ps4_LoginDialog_Running() )
- WaitFrame()
-
- PS4_ScheduleUserNetworkingEnabledTest()
- WaitFrame()
- if( !PS4_isUserNetworkingResolved() )
- {
- Hud_SetText( uiGlobal.ConfirmMenuErrorCode, "" )
- Hud_SetText( uiGlobal.ConfirmMenuMessage, "#PSN_CHECKING_USABILITY" )
- while( !PS4_isUserNetworkingResolved())
- WaitFrame()
- }
- }
-
- if( PS4_getUserNetworkingResolution() == PS4_NETWORK_STATUS_AGE_RESTRICTION )
- {
- Hud_SetText( uiGlobal.ConfirmMenuErrorCode, string(PS4_getUserNetworkingErrorStatus()) )
- Hud_SetText( uiGlobal.ConfirmMenuMessage, "#MULTIPLAYER_AGE_RESTRICTED" )
- return
- }
-
- if( PS4_getUserNetworkingResolution() == PS4_NETWORK_STATUS_IN_ERROR )
- {
- Hud_SetText( uiGlobal.ConfirmMenuErrorCode, string(PS4_getUserNetworkingErrorStatus()) )
- Hud_SetText( uiGlobal.ConfirmMenuMessage, "#PSN_HAD_ERROR" )
- return
- }
-
- if( !PS4_isUserNetworkingEnabled() )
- {
- Hud_SetText( uiGlobal.ConfirmMenuErrorCode, string(PS4_getUserNetworkingErrorStatus()) )
- Hud_SetText( uiGlobal.ConfirmMenuMessage, "#PSN_NOT_ALLOWED" )
- return
- }
-
- Hud_SetText( uiGlobal.ConfirmMenuErrorCode, "" )
- Hud_SetText( uiGlobal.ConfirmMenuMessage, "" )
- }
-
- if ( !Ps4_PSN_Is_Loggedin() )
- {
- Ps4_LoginDialog_Schedule()
- Hud_SetText( uiGlobal.ConfirmMenuMessage, "#PSN_LOGIN" )
-
- while( Ps4_LoginDialog_Running() )
- WaitFrame()
-
- if ( !Ps4_PSN_Is_Loggedin() )
- return
- }
-
- if( Ps4_CheckPlus_Schedule() )
- {
- while( Ps4_CheckPlus_Running() )
- WaitFrame()
- if( !Ps4_CheckPlus_Allowed() )
- {
- if( Ps4_CheckPlus_GetLastRequestResults() != 0 )
- {
- Hud_SetText( uiGlobal.ConfirmMenuErrorCode, string( Ps4_CheckPlus_GetLastRequestResults()) )
- Hud_SetText( uiGlobal.ConfirmMenuMessage, "#PSN_HAD_ERROR" )
- return
- }
-
- if( Ps4_ScreenPlusDialog_Schedule() )
- {
- while( Ps4_ScreenPlusDialog_Running() )
- WaitFrame()
- if( !Ps4_ScreenPlusDialog_Allowed() )
- {
- Hud_SetText( uiGlobal.ConfirmMenuMessage, "#PSN_MUST_BE_PLUS_USER" )
- return
- }
- }
- else
- {
- return
- }
- }
- }
-
- Hud_SetText( uiGlobal.ConfirmMenuErrorCode, "" )
- Hud_SetText( uiGlobal.ConfirmMenuMessage, "" )
-#endif // #if PS4_PROG
-
- printt( "Checking if this user has permission to play MP\n" )
- if ( !Console_HasPermissionToPlayMultiplayer() )
- {
- Hud_SetText( uiGlobal.ConfirmMenuMessage, "#MULTIPLAYER_NOT_AVAILABLE" )
- return
- }
-
- Plat_ShowUGCRestrictionNotice()
- while ( Plat_IsSystemMessageDialogOpen() )
- WaitFrame()
-
- Plat_ShowChatRestrictionNotice()
- while ( Plat_IsSystemMessageDialogOpen() )
- WaitFrame()
-
-#if PC_PROG
- if ( Origin_IsEnabled() )
- {
- Origin_RequestTicket()
- Hud_SetText( uiGlobal.ConfirmMenuMessage, "#WAITING_FOR_ORIGIN" )
-
- while ( !Origin_IsReady() )
- WaitFrame()
- }
-#endif // PC_PROG
-
- printt( "SearchForPartyServer" )
- SetMenuWasMultiplayerPlayedLast( true )
- SearchForPartyServer()
-
- Hud_SetAutoText( uiGlobal.ConfirmMenuMessage, "", HATT_MATCHMAKING_EMPTY_SERVER_SEARCH_STATE, 0 )
- Hud_SetAutoText( uiGlobal.ConfirmMenuErrorCode, "", HATT_MATCHMAKING_EMPTY_SERVER_SEARCH_ERROR, 0 )
-}
-
-void function EULA_Dialog()
-{
- if ( GetUserSignInState() != userSignInState.SIGNED_IN )
- return
-
- if ( GetEULAVersionAccepted() >= 1 )
- return
-
- AdvanceMenu( GetMenu( "EULADialog" ) )
-}
-
-void function DoGameNeedsToInstallDialog()
-{
- DialogData dialogData
- dialogData.header = "#MENU_WAIT_FOR_INTALL"
-
- int installProgress = int( GetGameFullyInstalledProgress()*100 )
-
- if ( uiGlobal.launching == eLaunching.MULTIPLAYER && IsGamePartiallyInstalled() && !Script_IsRunningTrialVersion() )
- {
- dialogData.message = Localize("#MENU_WAIT_FOR_INTALL_HINT", installProgress )
- AddDialogButton( dialogData, "#YES", LaunchSPNew )
- AddDialogButton( dialogData, "#NO" )
- }
- else
- {
- dialogData.message = Localize("#MENU_WAIT_FOR_INTALL_HINT_NOTRAINING", installProgress )
- AddDialogButton( dialogData, "#OK" )
- }
-
- AddDialogFooter( dialogData, "#A_BUTTON_SELECT" )
- AddDialogFooter( dialogData, "#B_BUTTON_CANCEL" )
-
- OpenDialog( dialogData )
-}
-
-void function UpdateTrialLabel()
-{
- bool isTrialVersion
- bool lastIsTrialVersion = Script_IsRunningTrialVersion()
-
- Hud_SetVisible( file.trialLabel, lastIsTrialVersion )
-
- while ( GetTopNonDialogMenu() == file.menu )
- {
- isTrialVersion = Script_IsRunningTrialVersion()
-
- if ( isTrialVersion != lastIsTrialVersion )
- Hud_SetVisible( file.trialLabel, isTrialVersion )
-
- lastIsTrialVersion = isTrialVersion
-
- WaitFrame()
- }
-}
-
-void function OpenSinglePlayerDevMenu( var button )
-{
- AdvanceMenu( GetMenu( "SinglePlayerDevMenu" ) )
-}