Merge branch 'develop' into develop_fk
This commit is contained in:
commit
5a12cb48f9
31 files changed
+239
-449
No files matched your search
@@ -38,12 +38,12 @@ namespace VocaluxeLib.Menu
|
||||
public static ISound Sound;
|
||||
public static ICover Cover;
|
||||
public static IDataBase DataBase;
|
||||
public static IInputs Input;
|
||||
public static IControllers Controller;
|
||||
public static IPlaylist Playlist;
|
||||
|
||||
public static void Assign(IConfig config, ISettings settings, ITheme theme, ILog log, IBackgroundMusic backgroundMusic,
|
||||
IDrawing draw, IGraphics graphics, IFonts fonts, ILanguage language, IGame game, IProfiles profiles, IRecording record,
|
||||
ISongs songs, IVideo video, ISound sound, ICover cover, IDataBase dataBase, IInputs input, IPlaylist playlist)
|
||||
ISongs songs, IVideo video, ISound sound, ICover cover, IDataBase dataBase, IControllers controller, IPlaylist playlist)
|
||||
{
|
||||
Config = config;
|
||||
Settings = settings;
|
||||
@@ -62,7 +62,7 @@ namespace VocaluxeLib.Menu
|
||||
Sound = sound;
|
||||
Cover = cover;
|
||||
DataBase = dataBase;
|
||||
Input = input;
|
||||
Controller = controller;
|
||||
Playlist = playlist;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -297,7 +297,9 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
public void Draw()
|
||||
{
|
||||
// ReSharper disable ConvertIfStatementToConditionalTernaryExpression
|
||||
if (_TextureName != "")
|
||||
// ReSharper restore ConvertIfStatementToConditionalTernaryExpression
|
||||
CBase.Drawing.DrawTexture(CBase.Theme.GetSkinTexture(_TextureName, _PartyModeID), _Rect, new SColorF(_Color.R, _Color.G, _Color.B, _Color.A * Alpha2 * _Alpha));
|
||||
else
|
||||
CBase.Drawing.DrawTexture(_Texture, _Rect, new SColorF(_Color.R, _Color.G, _Color.B, _Color.A * Alpha2 * _Alpha));
|
||||
|
||||
@@ -127,7 +127,9 @@ namespace VocaluxeLib.Menu
|
||||
if (Math.Abs(_MaxWidth - value) > 0.01)
|
||||
{
|
||||
_MaxWidth = value;
|
||||
// ReSharper disable ConvertIfStatementToConditionalTernaryExpression
|
||||
if (_MaxWidth > 0)
|
||||
// ReSharper restore ConvertIfStatementToConditionalTernaryExpression
|
||||
Bounds = new SRectF(-CBase.Settings.GetRenderW(), -CBase.Settings.GetRenderH(), _MaxWidth, 3f * CBase.Settings.GetRenderH(), 0f);
|
||||
else
|
||||
Bounds = new SRectF(-CBase.Settings.GetRenderW(), -CBase.Settings.GetRenderH(), 3f * CBase.Settings.GetRenderW(), 3f * CBase.Settings.GetRenderH(), 0f);
|
||||
@@ -332,7 +334,9 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
Selected = false;
|
||||
|
||||
// ReSharper disable ConvertIfStatementToConditionalTernaryExpression
|
||||
if (MaxWidth > 0)
|
||||
// ReSharper restore ConvertIfStatementToConditionalTernaryExpression
|
||||
Bounds = new SRectF(-CBase.Settings.GetRenderW(), -CBase.Settings.GetRenderH(), MaxWidth, 3f * CBase.Settings.GetRenderH(), 0f);
|
||||
else
|
||||
Bounds = new SRectF(-CBase.Settings.GetRenderW(), -CBase.Settings.GetRenderH(), 3f * CBase.Settings.GetRenderW(), 3f * CBase.Settings.GetRenderH(), 0f);
|
||||
@@ -367,7 +371,9 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
Selected = false;
|
||||
|
||||
// ReSharper disable ConvertIfStatementToConditionalTernaryExpression
|
||||
if (MaxWidth > 0)
|
||||
// ReSharper restore ConvertIfStatementToConditionalTernaryExpression
|
||||
Bounds = new SRectF(-CBase.Settings.GetRenderW(), -CBase.Settings.GetRenderH(), MaxWidth, 3f * CBase.Settings.GetRenderH(), 0f);
|
||||
else
|
||||
Bounds = new SRectF(-CBase.Settings.GetRenderW(), -CBase.Settings.GetRenderH(), 3f * CBase.Settings.GetRenderW(), 3f * CBase.Settings.GetRenderH(), 0f);
|
||||
@@ -400,7 +406,9 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
Selected = false;
|
||||
|
||||
// ReSharper disable ConvertIfStatementToConditionalTernaryExpression
|
||||
if (MaxWidth > 0)
|
||||
// ReSharper restore ConvertIfStatementToConditionalTernaryExpression
|
||||
Bounds = new SRectF(-CBase.Settings.GetRenderW(), -CBase.Settings.GetRenderH(), MaxWidth, 3f * CBase.Settings.GetRenderH(), 0f);
|
||||
else
|
||||
Bounds = new SRectF(-CBase.Settings.GetRenderW(), -CBase.Settings.GetRenderH(), 3f * CBase.Settings.GetRenderW(), 3f * CBase.Settings.GetRenderH(), 0f);
|
||||
@@ -435,7 +443,9 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
Selected = false;
|
||||
|
||||
// ReSharper disable ConvertIfStatementToConditionalTernaryExpression
|
||||
if (MaxWidth > 0)
|
||||
// ReSharper restore ConvertIfStatementToConditionalTernaryExpression
|
||||
Bounds = new SRectF(-CBase.Settings.GetRenderW(), -CBase.Settings.GetRenderH(), MaxWidth, 3f * CBase.Settings.GetRenderH(), 0f);
|
||||
else
|
||||
Bounds = new SRectF(-CBase.Settings.GetRenderW(), -CBase.Settings.GetRenderH(), 3f * CBase.Settings.GetRenderW(), 3f * CBase.Settings.GetRenderH(), 0f);
|
||||
@@ -509,7 +519,9 @@ namespace VocaluxeLib.Menu
|
||||
{
|
||||
LoadTextures();
|
||||
|
||||
// ReSharper disable ConvertIfStatementToConditionalTernaryExpression
|
||||
if (MaxWidth > 0)
|
||||
// ReSharper restore ConvertIfStatementToConditionalTernaryExpression
|
||||
Bounds = new SRectF(-CBase.Settings.GetRenderW(), -CBase.Settings.GetRenderH(), MaxWidth, 3f * CBase.Settings.GetRenderH(), 0f);
|
||||
else
|
||||
Bounds = new SRectF(-CBase.Settings.GetRenderW(), -CBase.Settings.GetRenderH(), 3f * CBase.Settings.GetRenderW(), 3f * CBase.Settings.GetRenderH(), 0f);
|
||||
|
||||
@@ -302,7 +302,7 @@ namespace VocaluxeLib.Menu
|
||||
bool GetCover(string fileName, ref STexture texture, int coverSize);
|
||||
}
|
||||
|
||||
public interface IInputs
|
||||
public interface IControllers
|
||||
{
|
||||
void SetRumble(float duration);
|
||||
}
|
||||
|
||||
@@ -348,13 +348,7 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
|
||||
public string Lyrics
|
||||
{
|
||||
get
|
||||
{
|
||||
string lyrics = String.Empty;
|
||||
foreach (CNote note in _Notes)
|
||||
lyrics += note.Text;
|
||||
return lyrics;
|
||||
}
|
||||
get { return _Notes.Aggregate(String.Empty, (current, note) => current + note.Text); }
|
||||
}
|
||||
|
||||
public int NoteCount
|
||||
@@ -364,13 +358,7 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
|
||||
public int Points
|
||||
{
|
||||
get
|
||||
{
|
||||
int points = 0;
|
||||
foreach (CNote note in _Notes)
|
||||
points += note.Points;
|
||||
return points;
|
||||
}
|
||||
get { return _Notes.Sum(note => note.Points); }
|
||||
}
|
||||
|
||||
public CNote[] Notes
|
||||
|
||||
@@ -347,7 +347,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
sel = true;
|
||||
|
||||
if (mouseEvent.Sender == ESender.WiiMote && _ActualSelection != lastselection && _ActualSelection != -1)
|
||||
CBase.Input.SetRumble(0.050f);
|
||||
CBase.Controller.SetRumble(0.050f);
|
||||
|
||||
if (!sel)
|
||||
_ActualSelection = -1;
|
||||
@@ -392,7 +392,9 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
tile.Draw(1.2f, tile.Rect.Z - 0.1f, EAspect.Crop);
|
||||
else
|
||||
{
|
||||
// ReSharper disable ConvertIfStatementToConditionalTernaryExpression
|
||||
if (tile.Texture.Index != _CoverTexture.Index)
|
||||
// ReSharper restore ConvertIfStatementToConditionalTernaryExpression
|
||||
tile.Draw(1f, tile.Rect.Z, EAspect.Crop);
|
||||
else
|
||||
tile.Draw(1f, tile.Rect.Z, EAspect.Stretch);
|
||||
@@ -433,7 +435,9 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
_Artist.Text = CBase.Songs.GetCategory(actcat).Name;
|
||||
|
||||
int num = CBase.Songs.NumSongsInCategory(actcat);
|
||||
// ReSharper disable ConvertIfStatementToConditionalTernaryExpression
|
||||
if (num != 1)
|
||||
// ReSharper restore ConvertIfStatementToConditionalTernaryExpression
|
||||
_Title.Text = CBase.Language.Translate("TR_SCREENSONG_NUMSONGS").Replace("%v", num.ToString());
|
||||
else
|
||||
_Title.Text = CBase.Language.Translate("TR_SCREENSONG_NUMSONG").Replace("%v", num.ToString());
|
||||
@@ -623,10 +627,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
{
|
||||
if (itemCount > i + offset)
|
||||
{
|
||||
if (isInCategory)
|
||||
_Tiles[i].Texture = CBase.Songs.GetVisibleSong(i + offset).CoverTextureSmall;
|
||||
else
|
||||
_Tiles[i].Texture = CBase.Songs.GetCategory(i + offset).CoverTextureSmall;
|
||||
_Tiles[i].Texture = isInCategory ? CBase.Songs.GetVisibleSong(i + offset).CoverTextureSmall : CBase.Songs.GetCategory(i + offset).CoverTextureSmall;
|
||||
_Tiles[i].Color = new SColorF(1f, 1f, 1f, 1f);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user