Пример #1
0
        public override void Draw()
        {
            foreach (CStatic tile in _Tiles)
            {
                if (tile.Selected)
                {
                    tile.Draw(EAspect.Crop, SelectedTileZoomFactor, -0.1f);
                }
                else
                {
                    EAspect aspect = (tile.Texture != _CoverBGTexture) ? EAspect.Crop : EAspect.Stretch;
                    tile.Draw(aspect);
                }
            }

            //highlight the text of the selected song
            int i = 0;

            foreach (CText text in _Texts)
            {
                if (i < _Tiles.Count && _Tiles[i].Selected)
                {
                    text.Font.Style = EStyle.BoldItalic;
                }
                else if (i < _Tiles.Count)
                {
                    text.Font.Style = EStyle.Normal;
                }
                else
                {
                    text.Text = "";
                }
                text.Draw();
                i++;
            }
            _TextBG.Draw();

            CTextureRef vidtex = CBase.BackgroundMusic.IsPlayingPreview() ? CBase.BackgroundMusic.GetVideoTexture() : null;

            if (vidtex != null)
            {
                if (vidtex.Color.A < 1)
                {
                    _CoverBig.Draw(EAspect.Crop);
                }
                SRectF rect = CHelper.FitInBounds(_CoverBig.Rect, vidtex.OrigAspect, EAspect.Crop);
                CBase.Drawing.DrawTexture(vidtex, rect, vidtex.Color, _CoverBig.Rect);
                CBase.Drawing.DrawTextureReflection(vidtex, rect, vidtex.Color, _CoverBig.Rect, _CoverBig.ReflectionSpace, _CoverBig.ReflectionHeight);
            }
            else
            {
                _CoverBig.Draw(EAspect.Crop);
            }

            foreach (IMenuElement element in _SubElements)
            {
                element.Draw();
            }
        }
Пример #2
0
        public override void Draw()
        {
            foreach (CStatic tile in _Tiles)
            {
                if (tile.Selected)
                {
                    tile.Draw(EAspect.Crop, SelectedTileZoomFactor, -0.1f);
                }
                else
                {
                    EAspect aspect = (tile.Texture != _CoverBGTexture) ? EAspect.Crop : EAspect.Stretch;
                    tile.Draw(aspect);
                }
            }

            _TextBG.Draw();

            CTextureRef vidtex = null;

            if (CBase.Config.GetVideoPreview() == EOffOn.TR_CONFIG_ON)
            {
                vidtex = (CBase.BackgroundMusic.IsPlayingPreview() ? CBase.BackgroundMusic.GetVideoTexture() : null);
            }

            if (vidtex != null)
            {
                if (vidtex.Color.A < 1)
                {
                    _CoverBig.Draw(EAspect.Crop);
                }
                SRectF rect = CHelper.FitInBounds(_CoverBig.Rect, vidtex.OrigAspect, EAspect.Crop);
                CBase.Drawing.DrawTexture(vidtex, rect, vidtex.Color, _CoverBig.Rect);
                CBase.Drawing.DrawTextureReflection(vidtex, rect, vidtex.Color, _CoverBig.Rect, _CoverBig.ReflectionSpace, _CoverBig.ReflectionHeight);
            }
            else
            {
                _CoverBig.Draw(EAspect.Crop);
            }

            foreach (IMenuElement element in _SubElements)
            {
                element.Draw();
            }
        }
Пример #3
0
        public override bool Draw()
        {
            base.Draw();

            if (DragAndDropActive)
            {
                DragAndDropCover.Draw();
            }

            return(true);
        }
Пример #4
0
        private void _DrawVideoPreview()
        {
            CTextureRef vidtex = CBase.BackgroundMusic.IsPlayingPreview() ? CBase.BackgroundMusic.GetVideoTexture() : null;

            if (vidtex != null)
            {
                if (vidtex.Color.A < 1)
                {
                    _VideoBG.Draw(EAspect.Crop);
                }
                SRectF rect = CHelper.FitInBounds(_VideoBG.Rect, vidtex.OrigAspect, EAspect.Crop);
                rect.Z = _VideoBG.Z;
                CBase.Drawing.DrawTexture(vidtex, rect, vidtex.Color, _VideoBG.Rect);
                CBase.Drawing.DrawTextureReflection(vidtex, rect, vidtex.Color, _VideoBG.Rect, _VideoBG.ReflectionSpace, _VideoBG.ReflectionHeight);
            }
            else
            {
                _VideoBG.Draw(EAspect.Crop);
            }
        }
Пример #5
0
        private void _DrawScrollBar()
        {
            if (CBase.Songs.GetNumSongsVisible() > _ListLength - 2 * _LAdj)
            {
                float Adjust            = (((float)_Offset / (CBase.Songs.GetNumSongsVisible() - _ListLength + 2 * _LAdj)) * (_ScrollBar.H - _ScrollBarPointer.H));
                float ScrollBarPosition = _ScrollBar.Y + Adjust;
                _ScrollBarPointer.Y = ScrollBarPosition;

                _ScrollBar.Draw();
                _ScrollBarPointer.Draw();
            }
        }
Пример #6
0
        public override bool Draw()
        {
            base.Draw();

            if (chooseAvatarStatic.Visible)
            {
                chooseAvatarStatic.Draw();
            }
            for (int i = 1; i <= CGame.NumPlayer; i++)
            {
                Equalizers[htEqualizer("EqualizerPlayer" + i)].Draw();
            }
            return(true);
        }
Пример #7
0
        public override void Draw()
        {
            _DrawScrollBar();
            _DrawTiles();
            _DrawCovers();
            _DrawVideoPreview();

            _TextBG.Draw();
            _BigCover.Draw(EAspect.LetterBox);
            foreach (IMenuElement element in _SubElements)
            {
                element.Draw();
            }

            _DrawTileArtistTexts();
            _DrawTileSongTitleTexts();
        }
Пример #8
0
        public override bool Draw()
        {
            base.Draw();

            //Draw background
            CDraw.DrawColor(new SColorF(0, 0.18f, 0.474f, 1), new SRectF(0, 0, CSettings.iRenderW, CSettings.iRenderH, 0));

            //Draw stars
            starsBlue.Update();
            starsBlue.Draw();
            starsRed.Update();
            starsRed.Draw();

            logo.Draw();

            //Draw credit-entries
            for (int i = 0; i < _CreditNames.Count; i++)
            {
                if (_CreditNames[i].active)
                {
                    _CreditNames[i].image.Draw();
                    _CreditNames[i].particle.Update();
                    _CreditNames[i].particle.Draw();
                }
            }

            //Draw Text
            if (TextTimer.IsRunning)
            {
                for (int i = 0; i < paragraphTexts.Count; i++)
                {
                    paragraphTexts[i].Draw();
                }
            }
            return(true);
        }
Пример #9
0
        public override void Draw()
        {
            foreach (CStatic tile in _Tiles)
            {
                if (tile.Selected && _Active)
                {
                    tile.Draw(1.2f, tile.Rect.Z - 0.1f, EAspect.Crop, false);
                }
                else
                {
                    if (tile.Texture.index != _CoverTexture.index)
                    {
                        tile.Draw(1f, tile.Rect.Z, EAspect.Crop, false);
                    }
                    else
                    {
                        tile.Draw(1f, tile.Rect.Z, EAspect.Stretch, false);
                    }
                }
            }

            if (CSongs.Category >= 0)
            {
                int actsong = _PreviewSelected;
                if ((CSongs.NumVisibleSongs > actsong) && (actsong >= 0))
                {
                    CSong song = CSongs.VisibleSongs[actsong];

                    _CoverBig.Texture       = song.CoverTextureSmall;
                    _Artist.Text            = song.Artist;
                    _Title.Text             = song.Title;
                    _DuetIcon.Visible       = song.IsDuet;
                    _VideoIcon.Visible      = song.VideoFileName.Length > 0;
                    _MedleyCalcIcon.Visible = song.Medley.Source == EMedleySource.Calculated;
                    _MedleyTagIcon.Visible  = song.Medley.Source == EMedleySource.Tag;

                    float Time = CSound.GetLength(_SongStream);
                    if (song.Finish != 0)
                    {
                        Time = song.Finish;
                    }

                    Time -= song.Start;
                    int min = (int)Math.Floor(Time / 60f);
                    int sec = (int)(Time - min * 60f);
                    _SongLength.Text = min.ToString("00") + ":" + sec.ToString("00");
                }
            }
            else
            {
                int actcat = _PreviewSelected;
                if ((CSongs.NumCategories > actcat) && (actcat >= 0))
                {
                    _CoverBig.Texture = CSongs.Categories[actcat].CoverTextureSmall;
                    _Artist.Text      = CSongs.Categories[actcat].Name;

                    int num = CSongs.NumSongsInCategory(actcat);
                    if (num != 1)
                    {
                        _Title.Text = CLanguage.Translate("TR_SCREENSONG_NUMSONGS").Replace("%v", num.ToString());
                    }
                    else
                    {
                        _Title.Text = CLanguage.Translate("TR_SCREENSONG_NUMSONG").Replace("%v", num.ToString());
                    }

                    _SongLength.Text        = String.Empty;
                    _DuetIcon.Visible       = false;
                    _VideoIcon.Visible      = false;
                    _MedleyCalcIcon.Visible = false;
                    _MedleyTagIcon.Visible  = false;
                }
            }

            _TextBG.Draw();

            _CoverBig.Draw(1f, EAspect.Crop);
            if (_vidtex.color.A < 1)
            {
                _CoverBig.Draw(1f, EAspect.Crop);
            }

            if (_vidtex.index != -1 && _Video != -1)
            {
                RectangleF bounds = new RectangleF(_CoverBig.Rect.X, _CoverBig.Rect.Y, _CoverBig.Rect.W, _CoverBig.Rect.H);
                RectangleF rect   = new RectangleF(0f, 0f, _vidtex.width, _vidtex.height);
                CHelper.SetRect(bounds, ref rect, rect.Width / rect.Height, EAspect.Crop);

                CDraw.DrawTexture(_vidtex, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, _CoverBig.Rect.Z),
                                  _vidtex.color, new SRectF(bounds.X, bounds.Y, bounds.Width, bounds.Height, 0f), false);
                CDraw.DrawTextureReflection(_vidtex, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, _CoverBig.Rect.Z),
                                            _vidtex.color, new SRectF(bounds.X, bounds.Y, bounds.Width, bounds.Height, 0f), _CoverBig.ReflectionSpace, _CoverBig.ReflectionHeight);
            }



            _Artist.Draw();
            _Title.Draw();
            _SongLength.Draw();
            _DuetIcon.Draw();
            _VideoIcon.Draw();
            _MedleyCalcIcon.Draw();
            _MedleyTagIcon.Draw();
        }