More refactoring and small fixes

This commit is contained in:
Flamefire committed 2013-04-23 14:22:42 +02:00
1 parent dcbbc5caf3
commit 1540be9120
46 files changed
+205 -526

No files matched your search

+1 -3
View File
@@ -24,7 +24,6 @@ namespace VocaluxeLib.Menu
public static IConfig Config;
public static ISettings Settings;
public static ITheme Theme;
public static IHelper Helper;
public static ILog Log;
public static IBackgroundMusic BackgroundMusic;
public static IDrawing Drawing;
@@ -42,14 +41,13 @@ namespace VocaluxeLib.Menu
public static IInputs Input;
public static IPlaylist Playlist;
public static void Assign(IConfig config, ISettings settings, ITheme theme, IHelper helper, ILog log, IBackgroundMusic backgroundMusic,
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)
{
Config = config;
Settings = settings;
Theme = theme;
Helper = helper;
Log = log;
BackgroundMusic = backgroundMusic;
Drawing = draw;
+1 -1
View File
@@ -241,7 +241,7 @@ namespace VocaluxeLib.Menu
public void Draw()
{
if (_Bars == null)
if (_Bars == null || _Theme.Style!=EEqualizerStyle.Collums)
return;
float dx = Rect.W / _Bars.Length;
+1 -1
View File
@@ -144,7 +144,7 @@ namespace VocaluxeLib.Menu
#region ThemeHandler
private delegate void AddElementHandler<in T>(T element, String key);
private void _LoadThemeElement<T>(string[] elements, AddElementHandler<T> addElementHandler, CXMLReader xmlReader, int skinIndex) where T : IMenuElement
private void _LoadThemeElement<T>(IEnumerable<string> elements, AddElementHandler<T> addElementHandler, CXMLReader xmlReader, int skinIndex) where T : IMenuElement
{
if (elements != null)
{
@@ -36,13 +36,6 @@ namespace VocaluxeLib.Menu
_Parent = parent;
}
public COrderedDictionaryLite(COrderedDictionaryLite<T> dict)
{
_Items = new List<T>(dict._Items);
_HtIndex = new Dictionary<String, int>(dict._HtIndex);
_Parent = dict._Parent;
}
public T this[int index]
{
get { return _Items[index]; }
+3 -7
View File
@@ -37,7 +37,10 @@ namespace VocaluxeLib.Menu
public ESettingType Type;
}
// ReSharper disable ClassNeverInstantiated.Global
//Instantiated by reflection
public class CScreenSetting : IMenuElement
// ReSharper restore ClassNeverInstantiated.Global
{
private readonly int _PartyModeID;
@@ -56,13 +59,6 @@ namespace VocaluxeLib.Menu
_ThemeLoaded = false;
}
public CScreenSetting(CScreenSetting ts)
{
_PartyModeID = ts._PartyModeID;
_Theme = ts._Theme;
_ThemeLoaded = ts._ThemeLoaded;
}
public bool LoadTheme(string xmlPath, string elementName, CXMLReader xmlReader, int skinIndex)
{
string item = xmlPath + "/" + elementName;
-2
View File
@@ -138,8 +138,6 @@ namespace VocaluxeLib.Menu
void LoadTheme();
}
public interface IHelper {}
public interface IBackgroundMusic
{
bool IsDisabled();
+1 -1
View File
@@ -57,7 +57,7 @@ namespace VocaluxeLib.Menu.SingNotes
public string SkinPerfectNoteStarName;
}
public abstract class CSingNotes : ISingNotes, IMenuElement
public abstract class CSingNotes : IMenuElement
{
protected int _PartyModeID;
private SThemeSingBar _Theme;
-41
View File
@@ -1,41 +0,0 @@
#region license
// /*
// This file is part of Vocaluxe.
//
// Vocaluxe is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Vocaluxe is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
// */
#endregion
using System.Collections.Generic;
namespace VocaluxeLib.Menu.SingNotes
{
public interface ISingNotes
{
void Reset();
int AddPlayer(SRectF rect, SColorF color, int playerNr);
void RemovePlayer(int iD);
void AddLine(int iD, CLine[] line, int lineNr, int player);
void RemoveLine(int iD);
void AddNote(int iD, CNote note);
void SetAlpha(int iD, float alpha);
float GetAlpha(int iD);
void Draw(int iD, int player);
void Draw(int iD, List<CLine> singLine, int player);
}
}
@@ -46,12 +46,6 @@ namespace VocaluxeLib.Menu.SongMenu
public SThemeSongMenuTileBoard SongMenuTileBoard;
}
struct SThemeSongMenuBook {}
struct SThemeSongMenuDreidel {}
struct SThemeSongMenuList {}
struct SThemeSongMenuTileBoard
{
/// <summary>
-1
View File
@@ -137,7 +137,6 @@
<Compile Include="Menu\SingNotes\CNotes.cs" />
<Compile Include="Menu\SingNotes\CSingNotes.cs" />
<Compile Include="Menu\SingNotes\CSingNotesClassic.cs" />
<Compile Include="Menu\SingNotes\ISingNotes.cs" />
<Compile Include="Menu\SongMenu\CSong.cs" />
<Compile Include="Menu\SongMenu\CSongMenu.cs" />
<Compile Include="Menu\SongMenu\CSongMenuBook.cs" />