From 42d98070f9e0ce4fc11b621d6711f2034683d5c6 Mon Sep 17 00:00:00 2001 From: mephasor Date: Sat, 13 Dec 2014 12:34:11 -0400 Subject: [PATCH] - Clened the list menu code a tiny bit - Added song number and total song count to the bottom text (instead of a scroll bar) --- Vocaluxe/Screens/CScreenSong.cs | 2 +- VocaluxeLib/Menu/SongMenu/CSongMenuList.cs | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Vocaluxe/Screens/CScreenSong.cs b/Vocaluxe/Screens/CScreenSong.cs index 3445c25c..351ab2b3 100644 --- a/Vocaluxe/Screens/CScreenSong.cs +++ b/Vocaluxe/Screens/CScreenSong.cs @@ -680,7 +680,7 @@ namespace Vocaluxe.Screens { int song = _SongMenu.GetSelectedSongNr(); if (song >= 0 && song < CSongs.VisibleSongs.Count) - selectionText = CSongs.VisibleSongs[song].Artist + " - " + CSongs.VisibleSongs[song].Title; + selectionText = CSongs.VisibleSongs[song].Artist + " - " + CSongs.VisibleSongs[song].Title + " ( "+(song+1)+" / "+CSongs.NumAllSongs+" )"; } else { diff --git a/VocaluxeLib/Menu/SongMenu/CSongMenuList.cs b/VocaluxeLib/Menu/SongMenu/CSongMenuList.cs index 9bef156d..eb4151e2 100644 --- a/VocaluxeLib/Menu/SongMenu/CSongMenuList.cs +++ b/VocaluxeLib/Menu/SongMenu/CSongMenuList.cs @@ -50,7 +50,6 @@ namespace VocaluxeLib.Menu.SongMenu private int _TileW; private int _TileH; - //TODO: remove all 1* from the code (artifacts from translation from tile board) //TODO: make variable list length private int _ListLength = 15; private float _CoverTileWidth; @@ -183,7 +182,6 @@ namespace VocaluxeLib.Menu.SongMenu //Create text var textRect = new SRectF(Rect.X + 2 * (_TileW + _SpaceW), Rect.Y + i * (_TileH + _SpaceH), _ListTextWidth, _TileH, Rect.Z); - //string textString = _Artist.Text + " - " + _Title.Text; CText text = new CText(textRect.X, textRect.Y, textRect.Z, textRect.H, textRect.W, EAlignment.Left, EStyle.Normal, "Normal", _Artist.Color, ""); @@ -421,7 +419,7 @@ namespace VocaluxeLib.Menu.SongMenu if (!songOptions.Selection.RandomOnly || (!CBase.Songs.IsInCategory() && songOptions.Selection.CategoryChangeAllowed)) { if (mouseEvent.Wheel != 0 && CHelper.IsInBounds(_ScrollRect, mouseEvent)) - _UpdateList(_Offset + 1 * mouseEvent.Wheel); + _UpdateList(_Offset + mouseEvent.Wheel); int lastSelection = _SelectionNr; int i = 0; @@ -508,7 +506,6 @@ namespace VocaluxeLib.Menu.SongMenu text.Draw(); i++; } - _TextBG.Draw(); CTextureRef vidtex = CBase.BackgroundMusic.IsPlayingPreview() ? CBase.BackgroundMusic.GetVideoTexture() : null; @@ -595,6 +592,7 @@ namespace VocaluxeLib.Menu.SongMenu { bool isInCategory = CBase.Songs.IsInCategory(); int itemCount = isInCategory ? CBase.Songs.GetNumSongsVisible() : CBase.Songs.GetNumCategories(); + int totalSongNumber = CBase.Songs.GetNumSongs(); offset = offset.Clamp(0, itemCount - _ListLength, true);