private bool DrawBackgroundMusicVideo() { STexture VideoTexture = CBackgroundMusic.GetVideoTexture(); 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 bool Draw() { if (!_Active) { return(false); } Statics[htStatics(StaticCover)].Texture = CBackgroundMusic.Cover; if (CBackgroundMusic.VideoEnabled && VideoPreview && CBackgroundMusic.SongHasVideo) { CDraw.DrawTexture(Statics[htStatics(StaticCover)], CBackgroundMusic.GetVideoTexture(), EAspect.Crop); } Buttons[htButtons(ButtonPause)].Visible = CBackgroundMusic.Playing; Buttons[htButtons(ButtonPlay)].Visible = !CBackgroundMusic.Playing; Texts[htTexts(TextCurrentSong)].Text = CBackgroundMusic.ArtistAndTitle; return(base.Draw()); }
public override bool UpdateGame() { if (CBackgroundMusic.VideoEnabled && _VideoPreview && CBackgroundMusic.SongHasVideo) { _Statics[_StaticCover].Texture = CBackgroundMusic.GetVideoTexture(); } else { _Statics[_StaticCover].Texture = CBackgroundMusic.Cover; } _Statics[_StaticCover].Visible = !_VideoPreviewInt || !CBackgroundMusic.SongHasVideo; _Buttons[_ButtonToBackgroundVideo].Pressed = _VideoBackground; _Buttons[_ButtonShowVideo].Pressed = _VideoPreviewInt; _Buttons[_ButtonRepeat].Pressed = CBackgroundMusic.RepeatSong; _Buttons[_ButtonSing].Visible = CBackgroundMusic.CanSing && CParty.CurrentPartyModeID == -1; _Buttons[_ButtonPause].Visible = CBackgroundMusic.IsPlaying; _Buttons[_ButtonPlay].Visible = !CBackgroundMusic.IsPlaying; _Texts[_TextCurrentSong].Text = CBackgroundMusic.ArtistAndTitle; return(true); }