Advertisement
Guest User

Menu Profile

a guest
Aug 4th, 2020
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.65 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public enum EMenuFontId
  6. {
  7.     None,
  8.     txtLanguage,
  9.     butNewGame,
  10.     butMultiplayer,
  11.     butLoad,
  12.     butRatings,
  13.     butSettings,
  14.     butWiki,
  15.     butCredits,
  16.     butQuit,
  17.     txtLoading,
  18.     txtCompleted,
  19.     txtVersion,
  20.  
  21.     titleNewUpdate,
  22.     txtUpdateInfo,
  23.     txtDoNotShow,
  24.     butUpdate,
  25.     butClose
  26. }
  27.  
  28. [CreateAssetMenu(fileName = "New Menu", menuName = "Localization/Menu")]
  29. public class LanguageProfileMenu : ScriptableObject
  30. {
  31.     [Header("Global settings")]
  32.     public string languageName = "English";
  33.     public SystemLanguage sysLanguage = SystemLanguage.English;
  34.     public Font font;
  35.     public int textFontSize = 30;
  36.  
  37.     [Header("Main menu")]
  38.     public string butNewGame = "New Game";
  39.     public string butMultiplayer = "Multiplayer";
  40.     public string butLoad = "Load";
  41.     public string butRatings = "Ratings";
  42.     public string butSettings = "Settings";
  43.     public string butWiki = "Wiki";
  44.     public string butCredits = "Credits";
  45.     public string butQuit = "Quit";
  46.     public string txtLoading = "Loading";
  47.     public string txtCompleted = "Completed";
  48.     public string txtVersion = "version";
  49.     public string txtCensored = "censored";
  50.  
  51.     [Header("New Update Window")]
  52.     public string titleNewUpdate = "New Update";
  53.     [TextArea(3, 10)]
  54.     public string txtUpdateInfo;
  55.     public string txtDoNotShow = "Do not show this again";
  56.     public string butUpdate = "Update";
  57.     public string butClose = "Close";
  58.  
  59.     public string GetText(EMenuFontId menuId)
  60.     {
  61.         switch(menuId)
  62.         {
  63.             case EMenuFontId.txtLanguage: return languageName;
  64.             case EMenuFontId.butNewGame: return butNewGame;
  65.             case EMenuFontId.butMultiplayer: return butMultiplayer;
  66.             case EMenuFontId.butLoad: return butLoad;
  67.             case EMenuFontId.butRatings: return butRatings;
  68.             case EMenuFontId.butSettings: return butSettings;
  69.             case EMenuFontId.butWiki: return butWiki;
  70.             case EMenuFontId.butQuit: return butQuit;
  71.             case EMenuFontId.txtLoading: return txtLoading;
  72.             case EMenuFontId.txtCompleted: return txtCompleted;
  73.             case EMenuFontId.txtVersion: return txtVersion;
  74.             case EMenuFontId.titleNewUpdate: return titleNewUpdate;
  75.             case EMenuFontId.txtUpdateInfo: return txtUpdateInfo;
  76.             case EMenuFontId.txtDoNotShow: return txtDoNotShow;
  77.             case EMenuFontId.butUpdate: return butUpdate;
  78.             case EMenuFontId.butClose: return butClose;
  79.             default: return "";
  80.         }
  81.     }
  82. }
  83.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement