private void ShowEditTagValues() { m_EditPlatformTags = m_Data.GetTagValuesForEachPlatform(m_TagAvailables[m_CurrentTagSelectId]); for (int i = 0; i < EnumSystem.GetEnumCount(typeof(eLanguageM_Platform)); i++) { eLanguageM_Platform platformInUse = (eLanguageM_Platform)i; if (platformInUse == eLanguageM_Platform.Unknown) { DrawSeparatorDark(true); } EditorGUILayout.BeginHorizontal(); m_EditPlatformTags.SetNewValue(platformInUse, ShowAdvancedTextInsert(platformInUse.ToString(), m_Data.GetTagValue(m_TagAvailables[m_CurrentTagSelectId], platformInUse), 2)); EditorGUILayout.EndHorizontal(); if (platformInUse == eLanguageM_Platform.Unknown) { ShowAdvancedLabelCenter("Return Unknow value if ask platform is null or empty"); DrawSeparatorDark(true); } } m_Data.EDITOR_SetPlatformTag(m_EditPlatformTags, m_TagAvailables[m_CurrentTagSelectId]); }
protected override void Awake() { AwakeAlwaysExecute(); InitDebuging(eManagers.LanguageManager); if (m_UseDeviceLanguage) { Language_SetCurrentLanguage(Application.systemLanguage); } else { Language_SetCurrentLanguage(m_DefaultLanguage); } m_CurrentPlatform = m_DefaultPlatform; Debug.Log(Debug_InitSucces("Language Manager as been init")); }
public void SetNewValue(eLanguageM_Platform aPlatform, string aValue) { switch (aPlatform) { //_____ XBOX ______________________\\ case eLanguageM_Platform.Xbox360: { Xbox360Txt = aValue; break; } case eLanguageM_Platform.XboxOne: { XboxOneTxt = aValue; break; } case eLanguageM_Platform.XboxProjectX: { XboxProjectXTxt = aValue; break; } //_____ PLAYSTATION ______________________\\ case eLanguageM_Platform.Playstation3: { Playstation3Txt = aValue; break; } case eLanguageM_Platform.Playstation4: { Playstation4Txt = aValue; break; } case eLanguageM_Platform.Playstation5: { Playstation5Txt = aValue; break; } //_____ PC ______________________\\ case eLanguageM_Platform.Windows: { WindowsTxt = aValue; break; } case eLanguageM_Platform.Linux: { LinuxTxt = aValue; break; } case eLanguageM_Platform.IosComputer: { IOSComputerTxt = aValue; break; } //_____ MOBILE ______________________\\ case eLanguageM_Platform.Android: { AndroidTxt = aValue; break; } case eLanguageM_Platform.IosMobile: { IOSMobileTxt = aValue; break; } //_____ NINTENDO ______________________\\ case eLanguageM_Platform.Switch: { SwitchTxt = aValue; break; } //_____ GOOGLE ______________________\\ case eLanguageM_Platform.Stadia: { StadiaTxt = aValue; break; } //_____ OTHERS ______________________\\ case eLanguageM_Platform.Unknown: { UnknowTxt = aValue; break; } } }
public string GetTagValue(string aTag, eLanguageM_Platform aWantPlatform) { if (!m_PlatformTags.ContainsKey(aTag)) { Debug.LogWarning("the tag '" + aTag + "' do no exist in the current Tag Platform Data"); return("Tag do not exist"); } sPlatformTag value = m_PlatformTags[aTag]; switch (aWantPlatform) { //_____ XBOX ______________________\\ case eLanguageM_Platform.Xbox360: { return(value.Xbox360Txt); } case eLanguageM_Platform.XboxOne: { return(value.XboxOneTxt); } case eLanguageM_Platform.XboxProjectX: { return(value.XboxProjectXTxt); } //_____ PLAYSTATION ______________________\\ case eLanguageM_Platform.Playstation3: { return(value.Playstation3Txt); } case eLanguageM_Platform.Playstation4: { return(value.Playstation4Txt); } case eLanguageM_Platform.Playstation5: { return(value.Playstation5Txt); } //_____ PC ______________________\\ case eLanguageM_Platform.Windows: { return(value.WindowsTxt); } case eLanguageM_Platform.Linux: { return(value.LinuxTxt); } case eLanguageM_Platform.IosComputer: { return(value.IOSComputerTxt); } //_____ MOBILE ______________________\\ case eLanguageM_Platform.Android: { return(value.AndroidTxt); } case eLanguageM_Platform.IosMobile: { return(value.IOSMobileTxt); } //_____ NINTENDO ______________________\\ case eLanguageM_Platform.Switch: { return(value.SwitchTxt); } //_____ GOOGLE ______________________\\ case eLanguageM_Platform.Stadia: { return(value.StadiaTxt); } } return(value.UnknowTxt); }
///<summary> /// The Tag system lets you call many type of device/system symbol (use with TMPRo SpriteAsset) with only one Tag, this system come with multiple option: /// 1- You can choose between Device (more accurate[xbox360, xboxOne, xboxProjectX]) and System (more general[xbox, playstation, computer]) to render symbol /// 2- You can also choose if you want to use multiple sprite sheet and change them when you render text on screen depend on the platform (device/system) /// OR /// You can choose if you want to use multple Tag Call, so you only have one spriteAsset for all platform, but you set the different call on the LanguageManager inspector ///</summary> #region TAG Functions ///<summary> Set the new Device in use </summary> public void Tag_SetCurrentDevice(eLanguageM_Platform aPlatform) { m_CurrentPlatform = aPlatform; }
private PlatformSpriteSheetDictionnary m_PlatformSpriteSheets = new PlatformSpriteSheetDictionnary(); //The dictionnary that contains multiple sprite sheet for each platform option public TMPro.TMP_SpriteAsset GetSpriteAsset(eLanguageM_Platform aPlatform) { return(m_PlatformSpriteSheets[aPlatform]); }