From c0a0c7e502f2bc99185d79a485b965f63de7a203 Mon Sep 17 00:00:00 2001 From: BobTheBob <32057864+BobTheBob9@users.noreply.github.com> Date: Wed, 1 Sep 2021 01:20:39 +0100 Subject: match setting localisation --- .../scripts/vscripts/ui/menu_ns_custom_match_settings.nut | 1 + .../mod/scripts/vscripts/ui/menu_private_match.nut | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'Northstar.Client/mod/scripts/vscripts') 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 index d39b7774..34ad4f77 100644 --- 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 @@ -17,6 +17,7 @@ void function AddNorthstarCustomMatchSettingsMenu() void function SetNextMatchSettingsCategory( string category ) { file.currentCategory = category + Hud_SetText( Hud_GetChild( GetMenu( "CustomMatchSettingsMenu" ), "Title" ), Localize( "#MENU_MATCH_SETTINGS_SUBMENU", Localize( category ) ) ) print( "Category: " + category ) file.enumRealValues.clear() diff --git a/Northstar.Client/mod/scripts/vscripts/ui/menu_private_match.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_private_match.nut index b1da22ee..d203a673 100644 --- a/Northstar.Client/mod/scripts/vscripts/ui/menu_private_match.nut +++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_private_match.nut @@ -628,6 +628,8 @@ function UpdateLobby() } else { + bool shouldBreak = false + foreach ( string category in GetPrivateMatchSettingCategories() ) { foreach ( CustomMatchSettingContainer setting in GetPrivateMatchCustomSettingsForCategory( category ) ) @@ -635,18 +637,18 @@ function UpdateLobby() 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" - + + shouldBreak = true break } } + + if ( shouldBreak ) + break } - - // sorta temp: ideally wanna localise playlist var names in the future } } -- cgit v1.2.3