@@ -474,9 +474,9 @@ private void AddPlayerExtraOptionForcedNotice(bool disabled, string type)
474
474
string . Format ( "The game host has disabled {0}" . L10N ( "UI:Main:HostDisableSection" ) , type ) :
475
475
string . Format ( "The game host has enabled {0}" . L10N ( "UI:Main:HostEnableSection" ) , type ) ) ;
476
476
477
- private List < GameModeMap > GetSortedGameModeMaps ( )
477
+ private List < GameModeMap > GetSortedGameModeMaps ( bool getAll )
478
478
{
479
- var gameModeMaps = gameModeMapFilter . GetGameModeMaps ( ) ;
479
+ var gameModeMaps = getAll ? GameModeMaps : gameModeMapFilter . GetGameModeMaps ( ) ;
480
480
switch ( ( SortDirection ) UserINISettings . Instance . MapSortState . Value )
481
481
{
482
482
case SortDirection . Asc :
@@ -501,13 +501,14 @@ protected void ListMaps()
501
501
502
502
int mapIndex = - 1 ;
503
503
int skippedMapsCount = 0 ;
504
+ bool isSearching = tbMapSearch . Text != tbMapSearch . Suggestion ;
504
505
505
- var isFavoriteMapsSelected = IsFavoriteMapsSelected ( ) ;
506
- var maps = GetSortedGameModeMaps ( ) ;
506
+ bool isFavoriteMapsSelected = IsFavoriteMapsSelected ( ) ;
507
+ var gameModeMaps = GetSortedGameModeMaps ( isSearching ) ;
507
508
508
- for ( int i = 0 ; i < maps . Count ; i ++ )
509
+ for ( int i = 0 ; i < gameModeMaps . Count ; i ++ )
509
510
{
510
- var gameModeMap = maps [ i ] ;
511
+ var gameModeMap = gameModeMaps [ i ] ;
511
512
if ( tbMapSearch . Text != tbMapSearch . Suggestion )
512
513
{
513
514
if ( ! gameModeMap . Map . Name . ToUpper ( ) . Contains ( tbMapSearch . Text . ToUpper ( ) ) )
@@ -529,8 +530,8 @@ protected void ListMaps()
529
530
rankItem . Texture = RankTextures [ GetDefaultMapRankIndex ( gameModeMap ) + 1 ] ;
530
531
531
532
XNAListBoxItem mapNameItem = new XNAListBoxItem ( ) ;
532
- var mapNameText = gameModeMap . Map . Name ;
533
- if ( isFavoriteMapsSelected )
533
+ string mapNameText = gameModeMap . Map . Name ;
534
+ if ( isFavoriteMapsSelected || isSearching )
534
535
mapNameText += $ " - { gameModeMap . GameMode . UIName } ";
535
536
536
537
mapNameItem . Text = Renderer . GetSafeString ( mapNameText , lbGameModeMapList . FontIndex ) ;
0 commit comments