- Clened the list menu code a tiny bit
- Added song number and total song count to the bottom text (instead of a scroll bar)
This commit is contained in:
1 parent
3b775e7bc6
commit
42d98070f9
2 files changed
+3
-5
No files matched your search
@@ -680,7 +680,7 @@ namespace Vocaluxe.Screens
|
|||||||
{
|
{
|
||||||
int song = _SongMenu.GetSelectedSongNr();
|
int song = _SongMenu.GetSelectedSongNr();
|
||||||
if (song >= 0 && song < CSongs.VisibleSongs.Count)
|
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
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -50,7 +50,6 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
private int _TileW;
|
private int _TileW;
|
||||||
private int _TileH;
|
private int _TileH;
|
||||||
|
|
||||||
//TODO: remove all 1* from the code (artifacts from translation from tile board)
|
|
||||||
//TODO: make variable list length
|
//TODO: make variable list length
|
||||||
private int _ListLength = 15;
|
private int _ListLength = 15;
|
||||||
private float _CoverTileWidth;
|
private float _CoverTileWidth;
|
||||||
@@ -183,7 +182,6 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
|
|
||||||
//Create text
|
//Create text
|
||||||
var textRect = new SRectF(Rect.X + 2 * (_TileW + _SpaceW), Rect.Y + i * (_TileH + _SpaceH), _ListTextWidth, _TileH, Rect.Z);
|
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,
|
CText text = new CText(textRect.X, textRect.Y, textRect.Z,
|
||||||
textRect.H, textRect.W, EAlignment.Left, EStyle.Normal,
|
textRect.H, textRect.W, EAlignment.Left, EStyle.Normal,
|
||||||
"Normal", _Artist.Color, "");
|
"Normal", _Artist.Color, "");
|
||||||
@@ -421,7 +419,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
if (!songOptions.Selection.RandomOnly || (!CBase.Songs.IsInCategory() && songOptions.Selection.CategoryChangeAllowed))
|
if (!songOptions.Selection.RandomOnly || (!CBase.Songs.IsInCategory() && songOptions.Selection.CategoryChangeAllowed))
|
||||||
{
|
{
|
||||||
if (mouseEvent.Wheel != 0 && CHelper.IsInBounds(_ScrollRect, mouseEvent))
|
if (mouseEvent.Wheel != 0 && CHelper.IsInBounds(_ScrollRect, mouseEvent))
|
||||||
_UpdateList(_Offset + 1 * mouseEvent.Wheel);
|
_UpdateList(_Offset + mouseEvent.Wheel);
|
||||||
|
|
||||||
int lastSelection = _SelectionNr;
|
int lastSelection = _SelectionNr;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
@@ -508,7 +506,6 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
text.Draw();
|
text.Draw();
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
_TextBG.Draw();
|
_TextBG.Draw();
|
||||||
|
|
||||||
CTextureRef vidtex = CBase.BackgroundMusic.IsPlayingPreview() ? CBase.BackgroundMusic.GetVideoTexture() : null;
|
CTextureRef vidtex = CBase.BackgroundMusic.IsPlayingPreview() ? CBase.BackgroundMusic.GetVideoTexture() : null;
|
||||||
@@ -595,6 +592,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
{
|
{
|
||||||
bool isInCategory = CBase.Songs.IsInCategory();
|
bool isInCategory = CBase.Songs.IsInCategory();
|
||||||
int itemCount = isInCategory ? CBase.Songs.GetNumSongsVisible() : CBase.Songs.GetNumCategories();
|
int itemCount = isInCategory ? CBase.Songs.GetNumSongsVisible() : CBase.Songs.GetNumCategories();
|
||||||
|
int totalSongNumber = CBase.Songs.GetNumSongs();
|
||||||
|
|
||||||
offset = offset.Clamp(0, itemCount - _ListLength, true);
|
offset = offset.Clamp(0, itemCount - _ListLength, true);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user