@@ -194,19 +194,23 @@ internal record TypeMapping(Type type, bool shouldCreateCache = true);
194194 /// <param name="action">The action to perform when the button is clicked.</param>
195195 /// <param name="buttonIndex">The index of the button in the UI.</param>
196196 /// <param name="sprite">The sprite for the button.</param>
197- public record GameModeButtonsInformation ( int gameModeIndex , UIButtonBase . ButtonAction action , int ? buttonIndex , Sprite ? sprite ) ;
197+ /// <param name="spriteName">The name of the sprite for the button.</param>
198+ public record GameModeButtonsInformation ( int gameModeIndex , UIButtonBase . ButtonAction action , int ? buttonIndex , Sprite ? sprite , string ? spriteName ) ;
198199
199200 /// <summary>
200201 /// Adds a new game mode button.
201202 /// </summary>
202203 /// <param name="id">The unique identifier for the game mode.</param>
203204 /// <param name="action">The action to perform when the button is clicked.</param>
205+ /// <param name="shouldShowInMenu">The boolean which decides if GameMode should appear in the menu.</param>
204206 /// <param name="sprite">The sprite for the button.</param>
205- public static void AddGameModeButton ( string id , UIButtonBase . ButtonAction action , Sprite ? sprite )
207+ /// <param name="spriteName">The name of the sprite for the button.</param>
208+ public static void AddGameMode ( string id , UIButtonBase . ButtonAction action , bool shouldShowInMenu = true , Sprite ? sprite = null , string ? spriteName = null )
206209 {
207210 EnumCache < GameMode > . AddMapping ( id , ( GameMode ) Registry . gameModesAutoidx ) ;
208211 EnumCache < GameMode > . AddMapping ( id , ( GameMode ) Registry . gameModesAutoidx ) ;
209- gamemodes . Add ( new GameModeButtonsInformation ( Registry . gameModesAutoidx , action , null , sprite ) ) ;
212+ if ( shouldShowInMenu )
213+ gamemodes . Add ( new GameModeButtonsInformation ( Registry . gameModesAutoidx , action , null , sprite , spriteName ) ) ;
210214 Registry . gameModesAutoidx ++ ;
211215 }
212216
0 commit comments