private void OnLoadClicked() { ThemeMix mix = Data.GetMixByIndex(_selectMixDropDown.selectedIndex); if (mix == null) { return; } Controller.LoadMix(mix); }
private void OnSelectedIndexChanged(UIComponent component, int value) { ThemeMix mix = Data.GetMixByIndex(_selectMixDropDown.selectedIndex); if (mix == null) { return; } _subscribeButtonPanel.isVisible = mix.ThemesMissing(); }
private void OnSubscribeClicked() { ThemeMix mix = Data.GetMixByIndex(_selectMixDropDown.selectedIndex); if (mix == null) { return; } mix.SubscribeMissingThemes(); Controller.CloseUI(); UIView.Find("DefaultTooltip")?.Hide(); UIUtils.ShowExceptionPanel(TranslationID.LABEL_SUBSCRIBE_WARNING_TITLE, TranslationID.LABEL_SUBSCRIBE_WARNING_MESSAGE, false); }
public void SaveLocalMix(ThemeMix mix) { Data.LocalMix = mix; SaveData(); }
public UIDirtyEventArgs(ThemeMix mix) { Mix = mix; }
public static string GetTextureSpriteName(TextureID textureID, string themeID = "") { if (themeID == null) { return(string.Empty); } if (themeID == string.Empty) { ThemeMix mix = ThemeManager.Instance.CurrentMix; switch (textureID) { case TextureID.GrassDiffuseTexture: themeID = mix.Terrain.GrassDiffuseTexture.ThemeID; break; case TextureID.RuinedDiffuseTexture: themeID = mix.Terrain.RuinedDiffuseTexture.ThemeID; break; case TextureID.PavementDiffuseTexture: themeID = mix.Terrain.PavementDiffuseTexture.ThemeID; break; case TextureID.GravelDiffuseTexture: themeID = mix.Terrain.GravelDiffuseTexture.ThemeID; break; case TextureID.CliffDiffuseTexture: themeID = mix.Terrain.CliffDiffuseTexture.ThemeID; break; case TextureID.SandDiffuseTexture: themeID = mix.Terrain.SandDiffuseTexture.ThemeID; break; case TextureID.OilDiffuseTexture: themeID = mix.Terrain.OilDiffuseTexture.ThemeID; break; case TextureID.OreDiffuseTexture: themeID = mix.Terrain.OreDiffuseTexture.ThemeID; break; case TextureID.CliffSandNormalTexture: themeID = mix.Terrain.CliffSandNormalTexture.ThemeID; break; case TextureID.UpwardRoadDiffuse: themeID = mix.Structures.UpwardRoadDiffuse.ThemeID; break; case TextureID.DownwardRoadDiffuse: themeID = mix.Structures.DownwardRoadDiffuse.ThemeID; break; case TextureID.BuildingFloorDiffuse: themeID = mix.Structures.BuildingFloorDiffuse.ThemeID; break; case TextureID.BuildingBaseDiffuse: themeID = mix.Structures.BuildingBaseDiffuse.ThemeID; break; case TextureID.BuildingBaseNormal: themeID = mix.Structures.BuildingBaseNormal.ThemeID; break; case TextureID.BuildingBurntDiffuse: themeID = mix.Structures.BuildingBurntDiffuse.ThemeID; break; case TextureID.BuildingAbandonedDiffuse: themeID = mix.Structures.BuildingAbandonedDiffuse.ThemeID; break; case TextureID.LightColorPalette: themeID = mix.Structures.LightColorPalette.ThemeID; break; case TextureID.MoonTexture: themeID = mix.Atmosphere.MoonTexture.ThemeID; break; case TextureID.WaterFoam: themeID = mix.Water.WaterFoam.ThemeID; break; case TextureID.WaterNormal: themeID = mix.Water.WaterNormal.ThemeID; break; } } if (themeID == null) { return(string.Empty); } themeID = Regex.Replace(themeID, @"(\s+|@|&|'|\(|\)|<|>|#|"")", ""); return(string.Concat(themeID, Enum.GetName(typeof(TextureID), textureID))); }