public void Pause() { if (_Theme.VideoName != String.Empty) { CTheme.SkinVideoPause(_Theme.VideoName); } }
public bool LoadTheme(string XmlPath, string ElementName, XPathNavigator navigator, int SkinIndex) { string item = XmlPath + "/" + ElementName; _ThemeLoaded = true; _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/X", navigator, ref Rect.X); _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/Y", navigator, ref Rect.Y); _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/Z", navigator, ref Rect.Z); _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/W", navigator, ref Rect.W); _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/H", navigator, ref Rect.H); _ThemeLoaded &= CHelper.GetValueFromXML(item + "/SkinEmptyTile", navigator, ref _Theme.TextureEmptyTileName, String.Empty); if (CHelper.GetValueFromXML(item + "/ColorEmptyTile", navigator, ref _Theme.ColorEmptyTileName, String.Empty)) { _ThemeLoaded &= CTheme.GetColor(_Theme.ColorEmptyTileName, SkinIndex, ref ColorEmptyTile); } else { _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/R", navigator, ref ColorEmptyTile.R); _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/G", navigator, ref ColorEmptyTile.G); _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/B", navigator, ref ColorEmptyTile.B); _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/A", navigator, ref ColorEmptyTile.A); } _ThemeLoaded &= CHelper.GetValueFromXML(item + "/SkinTileSelected", navigator, ref _Theme.TextureTileSelectedName, String.Empty); _ThemeLoaded &= CHelper.TryGetIntValueFromXML(item + "/Tiles/W", navigator, ref _TileW); _ThemeLoaded &= CHelper.TryGetIntValueFromXML(item + "/Tiles/H", navigator, ref _TileH); _ThemeLoaded &= CHelper.TryGetIntValueFromXML(item + "/Tiles/NumW", navigator, ref _NumW); _ThemeLoaded &= CHelper.TryGetIntValueFromXML(item + "/Tiles/NumH", navigator, ref _NumH); _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/Tiles/SpaceW", navigator, ref _SpaceW); _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/Tiles/SpaceH", navigator, ref _SpaceH); _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/Tiles/Name/Space", navigator, ref _Theme.NameSpace); _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/Tiles/Name/H", navigator, ref _Theme.NameHeight); _ThemeLoaded &= CHelper.GetValueFromXML(item + "/Tiles/Name/Font", navigator, ref _Theme.NameFont, "Normal"); _ThemeLoaded &= CHelper.TryGetEnumValueFromXML <EStyle>(item + "/Tiles/Name/Style", navigator, ref _Theme.NameStyle); if (CHelper.GetValueFromXML(item + "/Tiles/Name/Color", navigator, ref _Theme.NameColorName, String.Empty)) { _ThemeLoaded &= CTheme.GetColor(_Theme.NameColorName, SkinIndex, ref _Theme.NameColor); } else { if (CHelper.TryGetFloatValueFromXML(item + "/Tiles/Name/R", navigator, ref _Theme.NameColor.R)) { _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/Tiles/Name/G", navigator, ref _Theme.NameColor.G); _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/Tiles/Name/B", navigator, ref _Theme.NameColor.B); _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/Tiles/Name/A", navigator, ref _Theme.NameColor.A); } } if (_ThemeLoaded) { _Theme.Name = ElementName; LoadTextures(); } return(_ThemeLoaded); }
public void LoadTextures() { if (_Theme.ColorName != String.Empty) { Color = CTheme.GetColor(_Theme.ColorName); } }
private void OnChange() { if (_OldTheme != SelectSlides[htSelectSlides(SelectSlideTheme)].Selection) { CConfig.Theme = CTheme.ThemeNames[SelectSlides[htSelectSlides(SelectSlideTheme)].Selection]; _OldTheme = SelectSlides[htSelectSlides(SelectSlideTheme)].Selection; CTheme.UnloadSkins(); CFonts.UnloadThemeFonts(CConfig.Theme); CTheme.ListSkins(); CConfig.Skin = CTheme.SkinNames[0]; _OldSkin = 0; _TempSkin = _OldSkin; CConfig.SaveConfig(); CTheme.LoadSkins(); CTheme.LoadTheme(); CGraphics.ReloadTheme(); OnShow(); OnShowFinish(); return; } if (_TempSkin != SelectSlides[htSelectSlides(SelectSlideSkin)].Selection) { _TempSkin = SelectSlides[htSelectSlides(SelectSlideSkin)].Selection; PauseBG(); CConfig.Skin = CTheme.SkinNames[_TempSkin]; CGraphics.ReloadSkin(); ResumeBG(); } }
public void Draw(bool ForceDraw) { if (!Visible && CSettings.GameState != EGameState.EditTheme && !ForceDraw) { return; } STexture texture = new STexture(-1); if (!Selected) { texture = CTheme.GetSkinTexture(_Theme.TextureName); CDraw.DrawTexture(texture, Rect, Color); if (Reflection) { CDraw.DrawTextureReflection(texture, Rect, Color, Rect, ReflectionSpace, ReflectionHeight); } } else { texture = CTheme.GetSkinTexture(_Theme.STextureName); CDraw.DrawTexture(texture, Rect, SColor); if (Reflection) { CDraw.DrawTextureReflection(texture, Rect, SColor, Rect, ReflectionSpace, ReflectionHeight); } } Text.DrawRelative(Rect.X, Rect.Y); if (Reflection) { Text.DrawRelative(Rect.X, Rect.Y, ReflectionSpace, ReflectionHeight, Rect.H); } }
public void Resume() { if (_Theme.Type == EBackgroundTypes.Video && _Theme.VideoName != String.Empty && CConfig.VideoBackgrounds == EOffOn.TR_CONFIG_ON) { CTheme.SkinVideoResume(_Theme.VideoName); } }
public void KeyboardSelection(bool active, int player) { //Overwrite player-selection; Same profile, but other player if (active && Selection != -1) { _player = player; PlayerSelector.Color = CTheme.GetPlayerColor(player); } //Normal activation else if (active) { Selection = 0; _actualSelection = 0; _player = player; PlayerSelector.Color = CTheme.GetPlayerColor(player); PlayerSelector.Visible = true; } //Deactivate else { Selection = -1; _actualSelection = -1; _player = -1; PlayerSelector.Visible = false; } }
public static void SaveTheme() { CTheme.SaveTheme(); for (int i = 0; i < Screens.Length; i++) { Screens[i].SaveTheme(); } }
public virtual void LoadTextures() { Init(); if (_Theme.ColorName != String.Empty) { _Color = CTheme.GetColor(_Theme.ColorName); } }
public override void OnShow() { base.OnShow(); _OldCoverTheme = CCover.GetCoverThemeIndex(); _OldTheme = CTheme.GetThemeIndex(); _OldSkin = CTheme.GetSkinIndex(); _TempSkin = _OldSkin; }
public ActionResult AjouterThemeVerif(CTheme theme) { if (ModelState.IsValid) { //CDal dal = new CDal(); //dal.AjouterTheme(theme); theme.AjouterTheme(); } return(RedirectToAction("ListTheme")); }
private void OnSelChanged(object sender, EventArgs e) { if (((Gtk.IconView)sender).SelectedItems.Length > 0) { //man.ThemeIndex=int.Parse(((Gtk.IconView)sender).SelectedItems[0].ToString()); Gtk.TreeIter iter; CurrentIconView.Model.GetIter(out iter, CurrentIconView.SelectedItems[0]); string themename = CurrentIconView.Model.GetValue(iter, 1).ToString(); CTheme theme = man.GetTheme(themename); FillExtendedSection(theme); } }
public static void SaveTheme() { CTheme.SaveTheme(); for (int i = 0; i < _Screens.Count; i++) { _Screens[i].SaveTheme(); } for (int i = 0; i < _PopupScreens.Count; i++) { _PopupScreens[i].SaveTheme(); } }
private void DrawNoteBG(SRectF Rect, SColorF Color, float factor, Stopwatch Timer) { const int spacing = 0; const float period = 1.5f; //[s] if (!Timer.IsRunning) { Timer.Start(); } if (Timer.ElapsedMilliseconds / 1000f > period) { Timer.Reset(); Timer.Start(); } float alpha = (float)((Math.Cos((Timer.ElapsedMilliseconds / 1000f) / period * Math.PI * 2) + 1) / 2.0) / 2f + 0.5f; float d = (1f - factor) / 2 * Rect.H; float dw = d; if (2 * dw > Rect.W) { dw = Rect.W / 2; } SRectF r = new SRectF( Rect.X + dw + spacing, Rect.Y + d + spacing, Rect.W - 2 * dw - 2 * spacing, Rect.H - 2 * d - 2 * spacing, Rect.Z ); STexture NoteBackgroundBegin = CTheme.GetSkinTexture(_Theme.SkinBackgroundLeftName); STexture NoteBackgroundMiddle = CTheme.GetSkinTexture(_Theme.SkinBackgroundMiddleName); STexture NoteBackgroundEnd = CTheme.GetSkinTexture(_Theme.SkinBackgroundRightName); float dx = NoteBackgroundBegin.width * r.H / NoteBackgroundBegin.height; if (2 * dx > r.W) { dx = r.W / 2; } SColorF col = new SColorF(Color.R, Color.G, Color.B, Color.A * alpha); CDraw.DrawTexture(NoteBackgroundBegin, new SRectF(r.X, r.Y, dx, r.H, r.Z), col); CDraw.DrawTexture(NoteBackgroundMiddle, new SRectF(r.X + dx, r.Y, r.W - 2 * dx, r.H, r.Z), col); CDraw.DrawTexture(NoteBackgroundEnd, new SRectF(r.X + r.W - dx, r.Y, dx, r.H, r.Z), col); }
public void Draw(float scale, float z, bool aspect, bool ForceDraw) { STexture texture; if (_Texture.index != -1) { texture = _Texture; } else { texture = CTheme.GetSkinTexture(_Theme.TextureName); } SRectF bounds = new SRectF( Rect.X - Rect.W * (scale - 1f), Rect.Y - Rect.H * (scale - 1f), Rect.W + 2 * Rect.W * (scale - 1f), Rect.H + 2 * Rect.H * (scale - 1f), z); SRectF rect = bounds; if (aspect) { RectangleF bounds2 = new RectangleF(bounds.X, bounds.Y, bounds.W, bounds.H); RectangleF rect2 = new RectangleF(0f, 0f, texture.width, texture.height); CHelper.SetRect(bounds2, ref rect2, texture.width / texture.height, EAspect.Crop); rect.X = rect2.X; rect.Y = rect2.Y; rect.W = rect2.Width; rect.H = rect2.Height; } SColorF color = new SColorF(Color.R, Color.G, Color.B, Color.A * Alpha); if (Visible || ForceDraw || (CSettings.GameState == EGameState.EditTheme)) { CDraw.DrawTexture(texture, rect, color, bounds); if (Reflection) { CDraw.DrawTextureReflection(texture, rect, color, bounds, ReflectionSpace, ReflectionHeight); } } if (Selected && (CSettings.GameState == EGameState.EditTheme)) { CDraw.DrawColor(new SColorF(1f, 1f, 1f, 0.5f), rect); } }
void FillStore(int StoreIndex) { int themeCount = (int)(man.ThemeCount); stores[StoreIndex].Clear(); for (int i = 0; i < themeCount; i++) { CTheme theme = man.GetTheme(i); stores[StoreIndex].AppendValues(theme.ThumbnailPic, theme.Name, theme.Author, theme.DownloadCount); } if (themeCount >= 0) { man.ThemeIndex = 0; } }
public void LoadTextures() { _TextureEmptyTile = CTheme.GetSkinTexture(_Theme.TextureEmptyTileName); _TextureTileSelected = CTheme.GetSkinTexture(_Theme.TextureTileSelectedName); if (_Theme.ColorEmptyTileName != String.Empty) { ColorEmptyTile = CTheme.GetColor(_Theme.ColorEmptyTileName); } if (_Theme.NameColorName != String.Empty) { _Theme.NameColor = CTheme.GetColor(_Theme.NameColorName); } }
public IEnumerator CThemeGetRandomImages() { // Use the Assert class to test conditions. // yield to skip a frame //List<ImageHitRound> imagedata = new List<ImageHitRound>(); yield return(null); CTheme temp = new CTheme("xxx", new List <TImage>()); temp.sprites = new Sprite[10]; List <TImage> list = temp.getrandimages(10); Assert.IsTrue(list != null, "No getimages..."); }
private bool DrawVideo() { STexture VideoTexture = CTheme.GetSkinVideoTexture(_Theme.VideoName); if (VideoTexture.height > 0) { RectangleF bounds = new RectangleF(0f, 0f, CSettings.iRenderW, CSettings.iRenderH); RectangleF rect = new RectangleF(0f, 0f, VideoTexture.width, VideoTexture.height); CHelper.SetRect(bounds, ref rect, rect.Width / rect.Height, EAspect.Crop); CDraw.DrawTexture(VideoTexture, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, CSettings.zFar / 4)); return(true); } return(false); }
public override void Init() { base.Init(); _Rect = _Theme.songMenuTileBoard.TileRect; _NumW = _Theme.songMenuTileBoard.numW; _NumH = _Theme.songMenuTileBoard.numH; _SpaceW = _Theme.songMenuTileBoard.spaceW; _SpaceH = _Theme.songMenuTileBoard.spaceH; _PendingTime = 100L; _TileW = (int)((_Theme.songMenuTileBoard.TileRect.W - _SpaceW * (_NumW - 1)) / _NumW); _TileH = (int)((_Theme.songMenuTileBoard.TileRect.H - _SpaceH * (_NumH - 1)) / _NumH); _CoverTexture = CTheme.GetSkinTexture(_Theme.CoverBackgroundName); _CoverBigTexture = CTheme.GetSkinTexture(_Theme.CoverBigBackgroundName); _Tiles = new List <CStatic>(); for (int i = 0; i < _NumH; i++) { for (int j = 0; j < _NumW; j++) { SRectF rect = new SRectF(_Theme.songMenuTileBoard.TileRect.X + j * (_TileW + _SpaceW), _Theme.songMenuTileBoard.TileRect.Y + i * (_TileH + _SpaceH), _TileW, _TileH, _Rect.Z); CStatic tile = new CStatic(_CoverTexture, Color, rect); _Tiles.Add(tile); } } _ScrollRect = new SRectF(0, 0, CSettings.iRenderW, CSettings.iRenderH, _Theme.songMenuTileBoard.TileRect.Z); _PreviewSelected = -1; _Offset = 0; _CoverBig = _Theme.songMenuTileBoard.StaticCoverBig; _TextBG = _Theme.songMenuTileBoard.StaticTextBG; _DuetIcon = _Theme.songMenuTileBoard.StaticDuetIcon; _VideoIcon = _Theme.songMenuTileBoard.StaticVideoIcon; _MedleyCalcIcon = _Theme.songMenuTileBoard.StaticMedleyCalcIcon; _MedleyTagIcon = _Theme.songMenuTileBoard.StaticMedleyTagIcon; _Artist = _Theme.songMenuTileBoard.TextArtist; _Title = _Theme.songMenuTileBoard.TextTitle; _SongLength = _Theme.songMenuTileBoard.TextSongLength; }
public virtual void LoadTextures() { Init(); if (_Theme.ColorName != String.Empty) { _Color = CTheme.GetColor(_Theme.ColorName); } _Theme.songMenuTileBoard.StaticCoverBig.ReloadTextures(); _Theme.songMenuTileBoard.StaticTextBG.ReloadTextures(); _Theme.songMenuTileBoard.StaticDuetIcon.ReloadTextures(); _Theme.songMenuTileBoard.StaticVideoIcon.ReloadTextures(); _Theme.songMenuTileBoard.TextArtist.ReloadTextures(); _Theme.songMenuTileBoard.TextTitle.ReloadTextures(); }
public IEnumerator CThemeGetImages() { // Use the Assert class to test conditions. yield return(null); List <TImage> xxxx = new List <TImage>(); xxxx.Add(new TImage()); CTheme temp = new CTheme("xxx", xxxx); temp.sprites = new Sprite[10]; List <TImage> list = temp.getimages(); Assert.IsTrue(list != null, "No getimages..."); }
public override void LoadTheme() { base.LoadTheme(); SelectSlides[htSelectSlides(SelectSlideTheme)].AddValues(CTheme.ThemeNames); SelectSlides[htSelectSlides(SelectSlideTheme)].Selection = CTheme.GetThemeIndex(); SelectSlides[htSelectSlides(SelectSlideSkin)].AddValues(CTheme.SkinNames); SelectSlides[htSelectSlides(SelectSlideSkin)].Selection = CTheme.GetSkinIndex(); SelectSlides[htSelectSlides(SelectSlideCover)].AddValues(CCover.CoverThemes); SelectSlides[htSelectSlides(SelectSlideCover)].Selection = CCover.GetCoverThemeIndex(); SelectSlides[htSelectSlides(SelectSlideNoteLines)].SetValues <EOffOn>((int)CConfig.DrawNoteLines); SelectSlides[htSelectSlides(SelectSlideToneHelper)].SetValues <EOffOn>((int)CConfig.DrawToneHelper); SelectSlides[htSelectSlides(SelectSlideTimerLook)].SetValues <ETimerLook>((int)CConfig.TimerLook); SelectSlides[htSelectSlides(SelectSlideCoverLoading)].SetValues <ECoverLoading>((int)CConfig.CoverLoading); }
public CCursor(string textureName, SColorF color, float w, float h, float z) { _CursorFadingTimer = new Stopwatch(); ShowCursor = true; _CursorTargetAlpha = 1f; _CursorStartAlpha = 0f; _CursorFadingTime = 0.5f; _CursorName = textureName; _Cursor = CDraw.AddTexture(CTheme.GetSkinFilePath(_CursorName)); _Cursor.color = color; _Cursor.rect.W = w; _Cursor.rect.H = h; _Cursor.rect.Z = z; _Movetimer = new Stopwatch(); }
public bool LoadTheme(string XmlPath, string ElementName, XPathNavigator navigator, int SkinIndex) { string item = XmlPath + "/" + ElementName; _ThemeLoaded = true; _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/X", navigator, ref _X); _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/Y", navigator, ref _Y); _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/Z", navigator, ref _Z); _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/W", navigator, ref _MaxW); _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/H", navigator, ref _H); if (CHelper.GetValueFromXML(item + "/Color", navigator, ref _Theme.ColorName, String.Empty)) { _ThemeLoaded &= CTheme.GetColor(_Theme.ColorName, SkinIndex, ref Color); } else { _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/R", navigator, ref Color.R); _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/G", navigator, ref Color.G); _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/B", navigator, ref Color.B); _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/A", navigator, ref Color.A); } if (CHelper.GetValueFromXML(item + "/SColor", navigator, ref _Theme.SColorName, String.Empty)) { _ThemeLoaded &= CTheme.GetColor(_Theme.SColorName, SkinIndex, ref ColorProcessed); } else { _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/SR", navigator, ref ColorProcessed.R); _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/SG", navigator, ref ColorProcessed.G); _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/SB", navigator, ref ColorProcessed.B); _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/SA", navigator, ref ColorProcessed.A); } if (_ThemeLoaded) { _Theme.Name = ElementName; LoadTextures(); _Text = new CText(_X, _Y, _Z, _H, _MaxW, EAlignment.Left, EStyle.Bold, "Normal", Color, String.Empty); } return(_ThemeLoaded); }
public bool LoadTheme(string XmlPath, string ElementName, XPathNavigator navigator, int SkinIndex) { string item = XmlPath + "/" + ElementName; _ThemeLoaded = true; _ThemeLoaded &= CHelper.GetValueFromXML(item + "/Skin", navigator, ref _Theme.TextureName, String.Empty); _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/X", navigator, ref Rect.X); _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/Y", navigator, ref Rect.Y); _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/Z", navigator, ref Rect.Z); _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/W", navigator, ref Rect.W); _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/H", navigator, ref Rect.H); if (CHelper.GetValueFromXML(item + "/Color", navigator, ref _Theme.ColorName, String.Empty)) { _ThemeLoaded &= CTheme.GetColor(_Theme.ColorName, SkinIndex, ref Color); } else { _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/R", navigator, ref Color.R); _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/G", navigator, ref Color.G); _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/B", navigator, ref Color.B); _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/A", navigator, ref Color.A); } if (CHelper.ItemExistsInXML(item + "/Reflection", navigator)) { Reflection = true; _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/Reflection/Space", navigator, ref ReflectionSpace); _ThemeLoaded &= CHelper.TryGetFloatValueFromXML(item + "/Reflection/Height", navigator, ref ReflectionHeight); } else { Reflection = false; } if (_ThemeLoaded) { _Theme.Name = ElementName; LoadTextures(); } return(_ThemeLoaded); }
private void FillExtendedSection(CTheme theme) { bool isImage = config.BackgroundChoosen; string themeRating = theme.VoteSum.ToString(); ExtInfoImage.Pixbuf = theme.ThumbnailPic; ExtInfoName.Text = theme.Name; ExtInfoAuthor.Text = theme.Author; ExtInfoLicense.Text = theme.License; if (theme.Description.Trim() != "") { ExtInfoDescription.Text = theme.Description; } else { ExtInfoDescription.Text = Catalog.GetString("No description has been entered by the author"); } ExtInfoDownloads.Text = theme.DownloadCount.ToString(); if (themeRating == "0") { themeRating = Catalog.GetString("not rated"); } ExtInfoRating.Text = themeRating; if (isImage) { CBackgroundTheme bgt = (CBackgroundTheme)theme; imageTypeBox.Changed -= (EventHandler)OnImageTypeBoxChanged; imageResolutionsBox.Changed -= (EventHandler)OnImageResolutionsBoxChanged; FillComboboxWithStrings(imageTypeBox, bgt.GetAvailableTypes()); FillComboboxWithStrings(imageResolutionsBox, bgt.GetAvailableResolutions(CUtility.StrToImageType(imageTypeBox.ActiveText))); imageTypeBox.Changed += new EventHandler(OnImageTypeBoxChanged); imageResolutionsBox.Changed += new EventHandler(OnImageResolutionsBoxChanged); } imageTypeBox.Visible = isImage; imageResolutionsBox.Visible = isImage; imageStyleBox.Visible = isImage; ExtInfoImageTypeLabel.Visible = isImage; ExtInfoResolutionsLabel.Visible = isImage; ExtInfoImageStyleLabel.Visible = isImage; }
private static void ReloadCursor() { _Cursor.UnloadTextures(); if (CTheme.Cursor.color != string.Empty) { SColorF color; color = CTheme.GetColor(CTheme.Cursor.color); CTheme.Cursor.r = color.R; CTheme.Cursor.g = color.G; CTheme.Cursor.b = color.B; CTheme.Cursor.a = color.A; } _Cursor = new CCursor( CTheme.Cursor.SkinName, new SColorF(CTheme.Cursor.r, CTheme.Cursor.g, CTheme.Cursor.b, CTheme.Cursor.a), CTheme.Cursor.w, CTheme.Cursor.h, CSettings.zNear); }
private void AddPerfectNote(SRectF Rect, int n, float factor) { const int spacing = 0; float d = (1f - factor) / 2 * Rect.H; float dw = d; if (2 * dw > Rect.W) { dw = Rect.W / 2; } SRectF r = new SRectF( Rect.X + dw + spacing, Rect.Y + d + spacing, Rect.W - 2 * dw - 2 * spacing, Rect.H - 2 * d - 2 * spacing, Rect.Z ); STexture NoteBegin = CTheme.GetSkinTexture(_Theme.SkinLeftName); float dx = NoteBegin.width * r.H / NoteBegin.height; if (2 * dx > r.W) { dx = r.W / 2; } r = new SRectF( r.X + r.W - dx, r.Y, dx * 0.5f, dx * 0.2f, Rect.Z ); CParticleEffect stars = new CParticleEffect(CGame.Rand.Next(2) + 1, new SColorF(1f, 1f, 1f, 1f), r, _Theme.SkinPerfectNoteStarName, 35, EParticeType.PerfNoteStar); _PlayerNotes[n].PerfectNoteEffect.Add(stars); }
private void SaveConfig() { CConfig.Theme = CTheme.ThemeNames[SelectSlides[htSelectSlides(SelectSlideTheme)].Selection]; CConfig.Skin = CTheme.SkinNames[SelectSlides[htSelectSlides(SelectSlideSkin)].Selection]; CConfig.CoverTheme = CCover.CoverThemes[SelectSlides[htSelectSlides(SelectSlideCover)].Selection]; CConfig.DrawNoteLines = (EOffOn)SelectSlides[htSelectSlides(SelectSlideNoteLines)].Selection; CConfig.DrawToneHelper = (EOffOn)SelectSlides[htSelectSlides(SelectSlideToneHelper)].Selection; CConfig.TimerLook = (ETimerLook)SelectSlides[htSelectSlides(SelectSlideTimerLook)].Selection; CConfig.FadePlayerInfo = (EFadePlayerInfo)SelectSlides[htSelectSlides(SelectSlideFadeInfo)].Selection; CConfig.CoverLoading = (ECoverLoading)SelectSlides[htSelectSlides(SelectSlideCoverLoading)].Selection; CConfig.SaveConfig(); if (_OldCoverTheme != SelectSlides[htSelectSlides(SelectSlideCover)].Selection) { CCover.ReloadCover(); CSongs.Sort(CConfig.SongSorting); } if (_OldTheme != SelectSlides[htSelectSlides(SelectSlideTheme)].Selection) { CConfig.Theme = CTheme.ThemeNames[SelectSlides[htSelectSlides(SelectSlideTheme)].Selection]; _OldTheme = SelectSlides[htSelectSlides(SelectSlideTheme)].Selection; CTheme.UnloadSkins(); CFonts.UnloadThemeFonts(CConfig.Theme); CTheme.ListSkins(); CConfig.Skin = CTheme.SkinNames[0]; _OldSkin = 0; _TempSkin = _OldSkin; CConfig.SaveConfig(); CTheme.LoadSkins(); CTheme.LoadTheme(); CGraphics.ReloadTheme(); return; } }