diff --git a/Northstar.Client/mod/resource/ui/menus/mode_select.menu b/Northstar.Client/mod/resource/ui/menus/mode_select.menu new file mode 100644 index 000000000..fb525f31c --- /dev/null +++ b/Northstar.Client/mod/resource/ui/menus/mode_select.menu @@ -0,0 +1,366 @@ +resource/ui/menus/mode_select.menu +{ + menu + { + ControlName Frame + xpos 0 + ypos 0 + zpos 3 + wide f0 + tall f0 + autoResize 0 + pinCorner 0 + visible 1 + enabled 1 + PaintBackgroundType 0 + infocus_bgcolor_override "0 0 0 0" + outoffocus_bgcolor_override "0 0 0 0" + + MenuCommon + { + ControlName CNestedPanel + wide f0 + tall f0 + controlSettingsFile "resource/ui/menus/panels/menu_common.res" + } + + MatchmakingStatus + { + ControlName CNestedPanel + wide f0 + tall f0 + controlSettingsFile "resource/ui/menus/panels/matchmaking_status.res" + } + + NextModeImageFrame + { + ControlName RuiPanel + xpos 800 + ypos 160 + wide 860 + tall 418 + labelText "" + visible 1 + bgcolor_override "0 0 0 0" + paintbackground 1 + rui "ui/basic_border_box.rpak" + } + + NextModeImage + { + ControlName RuiPanel + pin_to_sibling NextModeImageFrame + pin_corner_to_sibling BOTTOM + pin_to_sibling_corner BOTTOM +// xpos -12 + ypos -12 + wide 480 + tall 240 + visible 1 + scaleImage 1 + rui "ui/basic_menu_image.rpak" + zpos 2 + } + NextModeImageCallsign //For calling card icons + { + ControlName RuiPanel +// xpos -12 + ypos -12 + wide 480 + tall 240 + visible 1 + scaleImage 1 + zpos 2 + pin_to_sibling NextModeImageFrame + pin_corner_to_sibling BOTTOM + pin_to_sibling_corner BOTTOM + rui "ui/callsign_icon_button.rpak" //For callsign mode images + } + ModeIconImage + { + ControlName RuiPanel + pin_to_sibling NextModeImage + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner TOP_LEFT + xpos 0 + ypos -16 + wide 72 + tall 72 + visible 1 + scaleImage 1 + rui "ui/basic_image_add.rpak" + zpos 3 + } + ModeIconImagePatch //For patch icons + { + ControlName RuiPanel + xpos 0 + ypos -16 + wide 72 + tall 72 + visible 1 + scaleImage 1 + zpos 3 + pin_to_sibling NextModeImage + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner TOP_LEFT + rui "ui/callsign_icon_button.rpak" + } + + NextModeName + { + ControlName Label + pin_to_sibling NextModeImageFrame + pin_corner_to_sibling TOP + pin_to_sibling_corner TOP + ypos -20 + wide 840 + auto_tall_tocontents 1 + visible 1 + labelText "Foo" + textAlignment center + centerWrap 1 + font Default_43_DropShadow + allcaps 1 + fgcolor_override "255 255 255 255" + } + + NextModeDesc + { + ControlName Label + pin_to_sibling NextModeName + pin_corner_to_sibling TOP + pin_to_sibling_corner BOTTOM + xpos 0 + ypos 0 + wide 840 + wrap 1 + auto_tall_tocontents 1 + visible 1 + labelText "Bar" + textAlignment center + centerWrap 1 + font Default_27 + allcaps 0 + fgcolor_override "255 255 255 255" + } + + MenuTitle + { + ControlName Label + InheritProperties MenuTitle + labelText "#SELECT_GAME_MODE" + } + + ButtonRowAnchor + { + ControlName Label + labelText "" + + xpos 96 + ypos 160 + } + + BtnMode1 + { + ControlName RuiButton + InheritProperties RuiSmallButton + classname ModeButton + scriptID 0 + navUp BtnMode15 + navDown BtnMode2 + + pin_to_sibling ButtonRowAnchor + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner TOP_LEFT + } + BtnMode2 + { + ControlName RuiButton + InheritProperties RuiSmallButton + classname ModeButton + scriptID 1 + pin_to_sibling BtnMode1 + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner BOTTOM_LEFT + navUp BtnMode1 + navDown BtnMode3 + } + BtnMode3 + { + ControlName RuiButton + InheritProperties RuiSmallButton + classname ModeButton + scriptID 2 + pin_to_sibling BtnMode2 + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner BOTTOM_LEFT + navUp BtnMode2 + navDown BtnMode4 + } + BtnMode4 + { + ControlName RuiButton + InheritProperties RuiSmallButton + classname ModeButton + scriptID 3 + pin_to_sibling BtnMode3 + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner BOTTOM_LEFT + //ypos 11 + navUp BtnMode3 + navDown BtnMode5 + } + BtnMode5 + { + ControlName RuiButton + InheritProperties RuiSmallButton + classname ModeButton + scriptID 4 + pin_to_sibling BtnMode4 + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner BOTTOM_LEFT + navUp BtnMode4 + navDown BtnMode6 + } + BtnMode6 + { + ControlName RuiButton + InheritProperties RuiSmallButton + classname ModeButton + scriptID 5 + pin_to_sibling BtnMode5 + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner BOTTOM_LEFT + navUp BtnMode5 + navDown BtnMode7 + } + BtnMode7 + { + ControlName RuiButton + InheritProperties RuiSmallButton + classname ModeButton + scriptID 6 + pin_to_sibling BtnMode6 + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner BOTTOM_LEFT + navUp BtnMode6 + navDown BtnMode8 + } + BtnMode8 + { + ControlName RuiButton + InheritProperties RuiSmallButton + classname ModeButton + scriptID 7 + pin_to_sibling BtnMode7 + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner BOTTOM_LEFT + navUp BtnMode7 + navDown BtnMode9 + } + BtnMode9 + { + ControlName RuiButton + InheritProperties RuiSmallButton + classname ModeButton + scriptID 8 + pin_to_sibling BtnMode8 + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner BOTTOM_LEFT + navUp BtnMode8 + navDown BtnMode10 + } + BtnMode10 + { + ControlName RuiButton + InheritProperties RuiSmallButton + classname ModeButton + scriptID 9 + pin_to_sibling BtnMode9 + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner BOTTOM_LEFT + navUp BtnMode9 + navDown BtnMode11 + } + BtnMode11 + { + ControlName RuiButton + InheritProperties RuiSmallButton + classname ModeButton + scriptID 10 + pin_to_sibling BtnMode10 + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner BOTTOM_LEFT + navUp BtnMode10 + navDown BtnMode12 + } + BtnMode12 + { + ControlName RuiButton + InheritProperties RuiSmallButton + classname ModeButton + scriptID 11 + pin_to_sibling BtnMode11 + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner BOTTOM_LEFT + navUp BtnMode11 + navDown BtnMode13 + } + BtnMode13 + { + ControlName RuiButton + InheritProperties RuiSmallButton + classname ModeButton + scriptID 12 + pin_to_sibling BtnMode12 + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner BOTTOM_LEFT + navUp BtnMode12 + navDown BtnMode14 + } + BtnMode14 + { + ControlName RuiButton + InheritProperties RuiSmallButton + classname ModeButton + scriptID 13 + pin_to_sibling BtnMode13 + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner BOTTOM_LEFT + navUp BtnMode13 + navDown BtnMode15 + } + BtnMode15 + { + ControlName RuiButton + InheritProperties RuiSmallButton + classname ModeButton + scriptID 14 + pin_to_sibling BtnMode14 + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner BOTTOM_LEFT + navUp BtnMode14 + navDown BtnMode1 + } + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + ButtonTooltip + { + ControlName CNestedPanel + InheritProperties ButtonTooltip + } + + FooterButtons + { + ControlName CNestedPanel + xpos 0 + ypos r119 + wide f0 + tall 36 + visible 1 + controlSettingsFile "resource/ui/menus/panels/footer_buttons.res" + } + } +} diff --git a/Northstar.Client/mod/resource/ui/menus/private_lobby.menu b/Northstar.Client/mod/resource/ui/menus/private_lobby.menu new file mode 100644 index 000000000..6f6e5bc81 --- /dev/null +++ b/Northstar.Client/mod/resource/ui/menus/private_lobby.menu @@ -0,0 +1,292 @@ +#base "combo_buttons.res" +resource/ui/menus/private_lobby.menu +{ + menu + { + ControlName Frame + xpos 0 + ypos 0 + zpos 3 + wide f0 + tall f0 + autoResize 0 + pinCorner 0 + visible 1 + enabled 1 + PaintBackgroundType 0 + infocus_bgcolor_override "0 0 0 0" + outoffocus_bgcolor_override "0 0 0 0" + + Vignette + { + ControlName ImagePanel + InheritProperties MenuVignette + } + + MenuTitle + { + ControlName Label + InheritProperties MenuTitle + labelText "#PRIVATE_LOBBY" + } + + ImgTopBar + { + ControlName ImagePanel + InheritProperties MenuTopBar + } + + MatchmakingStatus + { + ControlName CNestedPanel + wide f0 + tall f0 + visible 1 + controlSettingsFile "resource/ui/menus/panels/matchmaking_status.res" + } + + CreditsAvailable + { + ControlName RuiPanel + InheritProperties CreditsAvailableProperties + } + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + Screen + { + ControlName ImagePanel + wide f0 + tall f0 + visible 1 + scaleImage 1 + fillColor "0 0 0 0" + drawColor "0 0 0 0" + } + + CallsignCard + { + ControlName RuiPanel + rui "ui/callsign_basic.rpak" + pin_to_sibling Screen + pin_corner_to_sibling TOP_RIGHT + pin_to_sibling_corner TOP_RIGHT + xpos -96 + ypos -166 + wide 320 + tall 172 + visible 1 + scaleImage 1 + image vgui/white + fillColor "255 255 255 255" + zpos -1 + } + + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + ButtonRowAnchor + { + ControlName Label + labelText "" + + xpos 96 + ypos 215 + } + + StartMatchButton + { + ControlName RuiButton + InheritProperties RuiStartMatchButton + visible 1 + tabposition 1 + ypos 10 + + navRight ListFriendlies + + pin_to_sibling ButtonRowAnchor + pin_corner_to_sibling BOTTOM_LEFT + pin_to_sibling_corner TOP_LEFT + } + + NextMapImage + { + ControlName RuiPanel + wide 500 + tall 288 + visible 0 + scaleImage 1 + image "" + zpos -1 + + rui "ui/basic_menu_image.rpak" + + pin_to_sibling MatchEnemiesPanel + pin_corner_to_sibling BOTTOM_LEFT + pin_to_sibling_corner TOP_LEFT + + ypos 16 + } + NextMapName + { + ControlName Label + pin_to_sibling NextMapImage + pin_corner_to_sibling BOTTOM_RIGHT + pin_to_sibling_corner BOTTOM_RIGHT + + xpos -12 + ypos 0 + + 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 + + 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 "" + + rui "ui/basic_image_add.rpak" + + pin_to_sibling NextGameModeName + pin_corner_to_sibling BOTTOM_RIGHT + pin_to_sibling_corner TOP_RIGHT + } + NextModeIconPatch + { + ControlName RuiPanel + wide 72 + tall 72 + visible 0 + scaleImage 1 + image "" + + rui "ui/basic_image_add.rpak" + + pin_to_sibling NextGameModeName + pin_corner_to_sibling BOTTOM_RIGHT + pin_to_sibling_corner TOP_RIGHT + } + + MatchSettings + { + ControlName RuiPanel + InheritProperties MenuTooltipLarge + + rui "ui/private_settings_description.rpak" + + pin_to_sibling NextMapImage + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner TOP_RIGHT + xpos 16 + ypos 0 + + wide 500 + tall 288 + + visible 0 + } + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + SpectatorLabel + { + ControlName Label + pin_to_sibling MatchFriendliesPanel + pin_corner_to_sibling BOTTOM_LEFT + pin_to_sibling_corner TOP_LEFT + + xpos 0 + ypos 0 + + textAlignment center + + wide 500 + tall 40 + labelText "#LOBBY_SPECTATOR" + font Default_26 + allcaps 1 + fgcolor_override "255 255 255 255" + } + MatchFriendliesPanel + { + ControlName CNestedPanel + + pin_to_sibling ButtonRowAnchor + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner BOTTOM_LEFT + + ypos 435 + + InheritProperties LobbyPlayerListBackground + controlSettingsFile "resource/ui/menus/panels/match_friendlies.res" + } + + MatchEnemiesPanel + { + ControlName CNestedPanel + + pin_to_sibling MatchFriendliesPanel + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner TOP_RIGHT + + xpos 16 + + InheritProperties LobbyPlayerListBackground + controlSettingsFile "resource/ui/menus/panels/match_enemies.res" + } + + LobbyChatBox [$WINDOWS] + { + ControlName CBaseHudChat + InheritProperties ChatBox + + destination "match" + messageModeAlwaysOn 1 + + pin_to_sibling MatchEnemiesPanel + pin_corner_to_sibling TOP_LEFT + pin_to_sibling_corner TOP_RIGHT + + xpos 16 + } + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + ButtonTooltip + { + ControlName CNestedPanel + InheritProperties ButtonTooltip + } + + 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 index 4a84a714a..614e8e922 100644 --- a/Northstar.Client/mod/resource/ui/menus/server_browser.menu +++ b/Northstar.Client/mod/resource/ui/menus/server_browser.menu @@ -2491,6 +2491,22 @@ resource/ui/menus/mods_browse.menu pin_corner_to_sibling BOTTOM_RIGHT pin_to_sibling_corner TOP_RIGHT } + NextModeIconPatch + { + ControlName RuiPanel + wide 72 + tall 72 + visible 0 + scaleImage 1 + image "" + zpos 1 + + rui "ui/callsign_icon_button.rpak" + + pin_to_sibling NextGameModeName + pin_corner_to_sibling BOTTOM_RIGHT + pin_to_sibling_corner TOP_RIGHT + } ServerName { diff --git a/Northstar.Client/mod/scripts/vscripts/ui/menu_mode_select.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_mode_select.nut index 605af3832..e706e55c0 100644 --- a/Northstar.Client/mod/scripts/vscripts/ui/menu_mode_select.nut +++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_mode_select.nut @@ -1,5 +1,6 @@ global function InitModesMenu + struct { int currentModePage } file @@ -22,6 +23,7 @@ void function InitModesMenu() AddMenuFooterOption( menu, BUTTON_SHOULDER_RIGHT, "#PRIVATE_MATCH_PAGE_NEXT", "#PRIVATE_MATCH_PAGE_NEXT", CycleModesForward ) } + void function OnOpenModesMenu() { UpdateVisibleModes() @@ -66,7 +68,9 @@ void function ModeButton_GetFocus( var button ) var menu = GetMenu( "ModesMenu" ) var nextModeImage = Hud_GetChild( menu, "NextModeImage" ) + var nextModeImageAlt = Hud_GetChild( menu, "NextModeImageCallsign" ) var nextModeIcon = Hud_GetChild( menu, "ModeIconImage" ) + var nextModeIconAlt = Hud_GetChild( menu, "ModeIconImagePatch" ) var nextModeName = Hud_GetChild( menu, "NextModeName" ) var nextModeDesc = Hud_GetChild( menu, "NextModeDesc" ) @@ -77,9 +81,39 @@ void function ModeButton_GetFocus( var button ) string modeName = modesArray[modeId] - asset playlistImage = GetPlaylistImage( modeName ) - RuiSetImage( Hud_GetRui( nextModeImage ), "basicImage", playlistImage ) - RuiSetImage( Hud_GetRui( nextModeIcon ), "basicImage", GetPlaylistThumbnailImage( modeName ) ) + + string imageName = GetPlaylistVarOrUseValue( modeName, "imageOverride", "default" ) + if( imageName == "default" ) + { + asset playlistImage = GetPlaylistImage( modeName ) + RuiSetImage( Hud_GetRui( nextModeImage ), "basicImage", playlistImage ) + + Hud_Show( nextModeImage ) + Hud_Hide( nextModeImageAlt ) + } + else + { + asset playlistImage = StringToAsset( imageName ) + RuiSetImage( Hud_GetRui( nextModeImageAlt ), "iconImage", playlistImage ) + + Hud_Show( nextModeImageAlt ) + Hud_Hide( nextModeImage ) + } + string iconName = GetPlaylistVarOrUseValue( modeName, "IconOverride", "default" ) + if( iconName == "default" ) + { + RuiSetImage( Hud_GetRui( nextModeIcon ), "basicImage", GetPlaylistThumbnailImage( modeName ) ) + Hud_Show( nextModeIcon ) + Hud_Hide( nextModeIconAlt ) + } + else + { + var rui = Hud_GetRui( nextModeIconAlt ) + RuiSetImage( rui, "iconImage", StringToAsset( iconName ) ) + Hud_Show( nextModeIcon ) + Hud_Hide( nextModeIconAlt ) + } + Hud_SetText( nextModeName, GetGameModeDisplayName( modeName ) ) string mapName = PrivateMatch_GetSelectedMap() @@ -130,4 +164,4 @@ void function CycleModesForward( var button ) file.currentModePage++ UpdateVisibleModes() -} \ 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 index cdeb8b3e0..3cfe03e2d 100644 --- a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut +++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut @@ -758,6 +758,7 @@ void function FilterServerList() { totalPlayers += server.playerCount + // Filters if ( filterArguments.hideEmpty && server.playerCount == 0 ) continue; @@ -928,7 +929,27 @@ void function DisplayFocusedServerInfo( int scriptID ) // mode name/image string mode = server.playlist Hud_SetVisible( Hud_GetChild( menu, "NextModeIcon" ), true ) - RuiSetImage( Hud_GetRui( Hud_GetChild( menu, "NextModeIcon" ) ), "basicImage", GetPlaylistThumbnailImage( mode ) ) + + var nextModeIconAlt = Hud_GetChild( menu, "NextModeIconPatch" ) + var nextModeIcon = Hud_GetChild( menu, "NextModeIcon" ) + string iconName = GetPlaylistVarOrUseValue( mode, "iconOverride", "default" ) + + if(iconName == "default") + { + RuiSetImage( Hud_GetRui( nextModeIcon ), "basicImage", GetPlaylistThumbnailImage( mode ) ) + + Hud_Show( nextModeIcon ) + Hud_Hide( nextModeIconAlt ) + } + else + { + RuiSetImage( Hud_GetRui( nextModeIconAlt ), "iconImage", StringToAsset(iconName) ) + + Hud_Hide( nextModeIcon ) + Hud_Show( nextModeIconAlt ) + } + + Hud_SetVisible( Hud_GetChild( menu, "NextGameModeName" ), true ) if ( mode.len() != 0 ) 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 e3c1f268e..91e723039 100644 --- a/Northstar.Client/mod/scripts/vscripts/ui/menu_private_match.nut +++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_private_match.nut @@ -510,9 +510,24 @@ void function SetMapInfo( string mapName ) void function SetModeInfo( string modeName ) { + var nextModeIconAlt = Hud_GetChild( file.menu, "NextModeIconPatch" ) var nextModeIcon = Hud_GetChild( file.menu, "NextModeIcon" ) - RuiSetImage( Hud_GetRui( nextModeIcon ), "basicImage", GetPlaylistThumbnailImage( modeName ) ) - Hud_Show( nextModeIcon ) + string iconName = GetPlaylistVarOrUseValue( modeName, "iconOverride", "default" ) + + if( iconName == "default" ) + { + RuiSetImage( Hud_GetRui( nextModeIcon ), "basicImage", GetPlaylistThumbnailImage( modeName ) ) + + Hud_Show( nextModeIcon ) + Hud_Hide( nextModeIconAlt ) + } + else + { + RuiSetImage( Hud_GetRui( nextModeIconAlt ), "iconImage", StringToAsset( iconName ) ) + + Hud_Hide( nextModeIcon ) + Hud_Show( nextModeIconAlt ) + } Hud_SetText( file.nextGameModeLabel, GetGameModeDisplayName( modeName ) ) }