Remove unneeded constructors.

This commit is contained in:
Florian Küpper committed 2014-09-15 19:44:19 +02:00
1 parent 9ab0ea5f34
commit 4f8c482645
12 files changed
+48 -220

No files matched your search

+2 -12
View File
@@ -48,16 +48,6 @@ namespace VocaluxeLib.Menu
[XmlElement("Skin")]
public string TextureName;
public SThemeColor Color;
public SThemeBackground(SThemeBackground theme)
{
Name = theme.Name;
Type = theme.Type;
SlideShowTextures = theme.SlideShowTextures;
VideoName = theme.VideoName;
TextureName = theme.TextureName;
Color = new SThemeColor(theme.Color);
}
}
public class CBackground : IMenuElement
@@ -93,7 +83,7 @@ namespace VocaluxeLib.Menu
public CBackground(SThemeBackground theme, int partyModeID)
{
_Theme = new SThemeBackground(theme);
_Theme = theme;
_PartyModeID = partyModeID;
LoadTextures();
@@ -274,7 +264,7 @@ namespace VocaluxeLib.Menu
public SThemeBackground GetTheme()
{
return new SThemeBackground(_Theme);
return _Theme;
}
#endregion public
+2 -17
View File
@@ -46,21 +46,6 @@ namespace VocaluxeLib.Menu
public SReflection Reflection;
[XmlElement("SelReflection")]
public SReflection SelReflection;
public SThemeButton(SThemeButton theme)
{
Name = theme.Name;
TextureName = theme.TextureName;
SelTextureName = theme.SelTextureName;
Rect = new SRectF(theme.Rect);
Color = new SThemeColor(theme.Color);
SelColor = new SThemeColor(theme.SelColor);
Text = new SThemeText(theme.Text);
SText = new SThemeText(theme.SText);
Reflection = new SReflection(theme.Reflection);
SelReflection = new SReflection(theme.SelReflection);
STextSpecified = theme.STextSpecified;
}
}
public class CButton : IMenuElement
@@ -144,7 +129,7 @@ namespace VocaluxeLib.Menu
public CButton(SThemeButton theme, int partyModeID)
{
_PartyModeID = partyModeID;
_Theme = new SThemeButton(theme);
_Theme = theme;
Selected = false;
EditMode = false;
@@ -452,7 +437,7 @@ namespace VocaluxeLib.Menu
public SThemeButton GetTheme()
{
return new SThemeButton(_Theme);
return _Theme;
}
#region ThemeEdit
+2 -16
View File
@@ -53,20 +53,6 @@ namespace VocaluxeLib.Menu
public SThemeColor MaxColor;
[XmlElement("Reflection")]
public SReflection Reflection;
public SThemeEqualizer(SThemeEqualizer theme)
{
Name = theme.Name;
TextureName = theme.TextureName;
Rect = new SRectF(theme.Rect);
NumBars = theme.NumBars;
Space = theme.Space;
Style = theme.Style;
DrawNegative = theme.DrawNegative;
Color = new SThemeColor(theme.Color);
MaxColor = new SThemeColor(theme.MaxColor);
Reflection = new SReflection(theme.Reflection);
}
}
public class CEqualizer : IMenuElement
@@ -124,7 +110,7 @@ namespace VocaluxeLib.Menu
public CEqualizer(SThemeEqualizer theme, int partyModeID)
{
_PartyModeID = partyModeID;
_Theme = new SThemeEqualizer(theme);
_Theme = theme;
Visible = true;
ScreenHandles = false;
@@ -370,7 +356,7 @@ namespace VocaluxeLib.Menu
public SThemeEqualizer GetTheme()
{
return new SThemeEqualizer(_Theme);
return _Theme;
}
#region ThemeEdit
+2 -10
View File
@@ -35,14 +35,6 @@ namespace VocaluxeLib.Menu
public SThemeColor Color;
[XmlElement("SColor")]
public SThemeColor SColor;
public SThemeLyrics(SThemeLyrics theme)
{
Name = theme.Name;
Rect = new SRectF(theme.Rect);
Color = new SThemeColor(theme.Color);
SColor = new SThemeColor(theme.SColor);
}
}
public class CLyric : IMenuElement
@@ -131,7 +123,7 @@ namespace VocaluxeLib.Menu
public CLyric(SThemeLyrics theme, int partyModeID)
{
_PartyModeID = partyModeID;
_Theme = new SThemeLyrics(theme);
_Theme = theme;
_Line = new CSongLine();
_Text = new CText(_PartyModeID);
@@ -526,7 +518,7 @@ namespace VocaluxeLib.Menu
public SThemeLyrics GetTheme()
{
return new SThemeLyrics(_Theme);
return _Theme;
}
#region ThemeEdit
+2 -32
View File
@@ -40,16 +40,6 @@ namespace VocaluxeLib.Menu
public string TextureTileSelectedName;
[XmlElement("Tiles")]
public SThemeNameSelectionTiles Tiles;
public SThemeNameSelection(SThemeNameSelection theme)
{
Name = theme.Name;
Rect = new SRectF(theme.Rect);
TextureEmptyTileName = theme.TextureEmptyTileName;
ColorEmptyTile = new SThemeColor(theme.ColorEmptyTile);
TextureTileSelectedName = theme.TextureTileSelectedName;
Tiles = new SThemeNameSelectionTiles(theme.Tiles);
}
}
public struct SThemeNameSelectionTiles
@@ -68,17 +58,6 @@ namespace VocaluxeLib.Menu
public float SpaceH;
[XmlElement("Name")]
public SThemeNameSelectionName Name;
public SThemeNameSelectionTiles(SThemeNameSelectionTiles theme)
{
W = theme.W;
H = theme.H;
NumW = theme.NumW;
NumH = theme.NumH;
SpaceW = theme.SpaceW;
SpaceH = theme.SpaceH;
Name = new SThemeNameSelectionName(theme.Name);
}
}
public struct SThemeNameSelectionName
@@ -93,15 +72,6 @@ namespace VocaluxeLib.Menu
public EStyle Style;
[XmlElement("Color")]
public SThemeColor Color;
public SThemeNameSelectionName(SThemeNameSelectionName theme)
{
Space = theme.Space;
Height = theme.Height;
Font = theme.Font;
Style = theme.Style;
Color = new SThemeColor(theme.Color);
}
}
public class CNameSelection : IMenuElement
@@ -176,7 +146,7 @@ namespace VocaluxeLib.Menu
public CNameSelection(SThemeNameSelection theme, int partyModeID)
{
_PartyModeID = partyModeID;
_Theme = new SThemeNameSelection(theme);
_Theme = theme;
_Tiles = new List<CTile>();
_VisibleProfiles = new List<int>();
@@ -647,7 +617,7 @@ namespace VocaluxeLib.Menu
public SThemeNameSelection GetTheme()
{
return new SThemeNameSelection(_Theme);
return _Theme;
}
#region ThemeEdit
+2 -13
View File
@@ -42,17 +42,6 @@ namespace VocaluxeLib.Menu
public float Size;
[XmlElement("MaxNumber")]
public int MaxNumber;
public SThemeParticleEffect(SThemeParticleEffect theme)
{
Name = theme.Name;
TextureName = theme.TextureName;
Rect = new SRectF(theme.Rect);
Color = new SThemeColor(theme.Color);
Type = theme.Type;
Size = theme.Size;
MaxNumber = theme.MaxNumber;
}
}
public enum EParticleType
@@ -401,7 +390,7 @@ namespace VocaluxeLib.Menu
public CParticleEffect(SThemeParticleEffect theme, int partyModeID)
{
_PartyModeID = partyModeID;
_Theme = new SThemeParticleEffect(theme);
_Theme = theme;
_Stars = new List<CParticle>();
_SpawnTimer = new Stopwatch();
_NextSpawnTime = 0f;
@@ -656,7 +645,7 @@ namespace VocaluxeLib.Menu
public SThemeParticleEffect GetTheme()
{
return new SThemeParticleEffect(_Theme);
return _Theme;
}
#region ThemeEdit
+2 -9
View File
@@ -39,13 +39,6 @@ namespace VocaluxeLib.Menu
public string Value;
[XmlElement("Type")]
public ESettingType Type;
public SScreenSetting(SScreenSetting theme)
{
Name = theme.Name;
Value = theme.Value;
Type = theme.Type;
}
}
// ReSharper disable ClassNeverInstantiated.Global
@@ -78,7 +71,7 @@ namespace VocaluxeLib.Menu
public CScreenSetting(SScreenSetting theme, int partyModeID)
{
_PartyModeID = partyModeID;
_Theme = new SScreenSetting(theme);
_Theme = theme;
}
public bool LoadTheme(string xmlPath, string elementName, CXMLReader xmlReader, int skinIndex)
@@ -138,7 +131,7 @@ namespace VocaluxeLib.Menu
public SScreenSetting GetTheme()
{
return new SScreenSetting(_Theme);
return _Theme;
}
#region Private
+2 -31
View File
@@ -87,35 +87,6 @@ namespace VocaluxeLib.Menu
[XmlElement("NumVisible")]
public int NumVisible;
public SThemeSelectSlide(SThemeSelectSlide theme)
{
Name = theme.Name;
TextureName = theme.TextureName;
TextureArrowLeftName = theme.TextureArrowLeftName;
TextureArrowRightName = theme.TextureArrowRightName;
SelTextureName = theme.SelTextureName;
SelTextureArrowLeftName = theme.SelTextureArrowLeftName;
SelTextureArrowRightName = theme.SelTextureArrowRightName;
HighlightTextureName = theme.HighlightTextureName;
Rect = new SRectF(theme.Rect);
RectArrowLeft = new SRectF(theme.RectArrowLeft);
RectArrowRight = new SRectF(theme.RectArrowRight);
Color = new SThemeColor(theme.Color);
SColor = new SThemeColor(theme.SColor);
HColor = new SThemeColor(theme.HColor);
ArrowColor = new SThemeColor(theme.ArrowColor);
ArrowSColor = new SThemeColor(theme.ArrowSColor);
TextColor = new SThemeColor(theme.TextColor);
TextSColor = new SThemeColor(theme.TextSColor);
TextH = theme.TextH;
TextRelativeX = theme.TextRelativeX;
TextRelativeY = theme.TextRelativeY;
TextMaxW = theme.TextMaxW;
TextFont = theme.TextFont;
TextStyle = theme.TextStyle;
NumVisible = theme.NumVisible;
}
}
public class CSelectSlide : IMenuElement, ICloneable
@@ -314,7 +285,7 @@ namespace VocaluxeLib.Menu
public CSelectSlide(SThemeSelectSlide theme, int partyModeID)
{
_PartyModeID = partyModeID;
_Theme = new SThemeSelectSlide(theme);
_Theme = theme;
_Selected = false;
_Textures = new List<CTexture>();
@@ -913,7 +884,7 @@ namespace VocaluxeLib.Menu
public SThemeSelectSlide GetTheme()
{
return new SThemeSelectSlide(_Theme);
return _Theme;
}
public void UnloadTextures() {}
+2 -11
View File
@@ -32,15 +32,6 @@ namespace VocaluxeLib.Menu
public SThemeColor Color;
public SRectF Rect;
public SReflection Reflection;
public SThemeStatic(SThemeStatic theme)
{
Name = theme.Name;
TextureName = theme.TextureName;
Color = new SThemeColor(theme.Color);
Rect = new SRectF(theme.Rect);
Reflection = new SReflection(theme.Reflection);
}
}
public class CStatic : IMenuElement
@@ -128,7 +119,7 @@ namespace VocaluxeLib.Menu
public CStatic(SThemeStatic theme, int partyModeID)
{
_PartyModeID = partyModeID;
_Theme = new SThemeStatic(theme);
_Theme = theme;
LoadTextures();
}
@@ -281,7 +272,7 @@ namespace VocaluxeLib.Menu
public SThemeStatic GetTheme()
{
return new SThemeStatic(_Theme);
return _Theme;
}
#region ThemeEdit
+2 -20
View File
@@ -51,24 +51,6 @@ namespace VocaluxeLib.Menu
[XmlElement("Text")]
public string Text;
public SReflection Reflection;
public SThemeText(SThemeText theme)
{
Name = theme.Name;
X = theme.X;
Y = theme.Y;
Z = theme.Z;
Height = theme.Height;
MaxWidth = theme.MaxWidth;
Color = new SThemeColor(theme.Color);
SColor = new SThemeColor(theme.SColor);
Align = theme.Align;
ResizeAlign = theme.ResizeAlign;
Style = theme.Style;
Font = theme.Font;
Text = theme.Text;
Reflection = new SReflection(theme.Reflection);
}
}
public class CText : IMenuElement
@@ -356,7 +338,7 @@ namespace VocaluxeLib.Menu
public CText(SThemeText theme, int partyModeID)
{
_PartyModeID = partyModeID;
_Theme = new SThemeText(theme);
_Theme = theme;
LoadTextures();
}
@@ -628,7 +610,7 @@ namespace VocaluxeLib.Menu
public SThemeText GetTheme()
{
return new SThemeText(_Theme);
return _Theme;
}
#region ThemeEdit
+10 -31
View File
@@ -63,7 +63,7 @@ namespace VocaluxeLib.Menu.SongMenu
MedleyCalcIcon = theme.MedleyCalcIcon;
MedleyTagIcon = theme.MedleyTagIcon;
Color = new SThemeColor(theme.Color);
SongMenuTileBoard = new SThemeSongMenuTileBoard(theme.SongMenuTileBoard);
SongMenuTileBoard = theme.SongMenuTileBoard;
}
}
@@ -111,45 +111,24 @@ namespace VocaluxeLib.Menu.SongMenu
public SRectF TileRectSmall;
[XmlElement("TextArtist")]
public SThemeText STextArtist;
public SThemeText TextArtist;
[XmlElement("TextTitle")]
public SThemeText STextTitle;
public SThemeText TextTitle;
[XmlElement("TextSongLength")]
public SThemeText STextSongLength;
public SThemeText TextSongLength;
[XmlElement("StaticCoverBig")]
public SThemeStatic SStaticCoverBig;
public SThemeStatic StaticCoverBig;
[XmlElement("StaticTextBG")]
public SThemeStatic SStaticTextBG;
public SThemeStatic StaticTextBG;
[XmlElement("StaticDuetIcon")]
public SThemeStatic SStaticDuetIcon;
public SThemeStatic StaticDuetIcon;
[XmlElement("StaticVideoIcon")]
public SThemeStatic SStaticVideoIcon;
public SThemeStatic StaticVideoIcon;
[XmlElement("StaticMedleyCalcIcon")]
public SThemeStatic SStaticMedleyCalcIcon;
public SThemeStatic StaticMedleyCalcIcon;
[XmlElement("StaticMedleyTagIcon")]
public SThemeStatic SStaticMedleyTagIcon;
public SThemeSongMenuTileBoard(SThemeSongMenuTileBoard theme)
{
NumW = theme.NumW;
NumH = theme.NumH;
NumWsmall = theme.NumWsmall;
NumHsmall = theme.NumHsmall;
SpaceW = theme.SpaceW;
SpaceH = theme.SpaceH;
TileRect = new SRectF(theme.TileRect);
TileRectSmall = new SRectF(theme.TileRectSmall);
STextArtist = new SThemeText(theme.STextArtist);
STextTitle = new SThemeText(theme.STextTitle);
STextSongLength = new SThemeText(theme.STextSongLength);
SStaticCoverBig = new SThemeStatic(theme.SStaticCoverBig);
SStaticTextBG = new SThemeStatic(theme.SStaticTextBG);
SStaticDuetIcon = new SThemeStatic(theme.SStaticDuetIcon);
SStaticVideoIcon = new SThemeStatic(theme.SStaticVideoIcon);
SStaticMedleyCalcIcon = new SThemeStatic(theme.SStaticMedleyCalcIcon);
SStaticMedleyTagIcon = new SThemeStatic(theme.SStaticMedleyTagIcon);
}
public SThemeStatic StaticMedleyTagIcon;
}
abstract class CSongMenuFramework : ISongMenu
+18 -18
View File
@@ -141,15 +141,15 @@ namespace VocaluxeLib.Menu.SongMenu
{
_Theme.Name = elementName;
_Theme.SongMenuTileBoard.STextArtist = _Artist.GetTheme();
_Theme.SongMenuTileBoard.STextSongLength = _SongLength.GetTheme();
_Theme.SongMenuTileBoard.STextTitle = _Title.GetTheme();
_Theme.SongMenuTileBoard.SStaticCoverBig = _CoverBig.GetTheme();
_Theme.SongMenuTileBoard.SStaticDuetIcon = _DuetIcon.GetTheme();
_Theme.SongMenuTileBoard.SStaticMedleyCalcIcon = _MedleyCalcIcon.GetTheme();
_Theme.SongMenuTileBoard.SStaticMedleyTagIcon = _MedleyTagIcon.GetTheme();
_Theme.SongMenuTileBoard.SStaticTextBG = _TextBG.GetTheme();
_Theme.SongMenuTileBoard.SStaticVideoIcon = _VideoIcon.GetTheme();
_Theme.SongMenuTileBoard.TextArtist = _Artist.GetTheme();
_Theme.SongMenuTileBoard.TextSongLength = _SongLength.GetTheme();
_Theme.SongMenuTileBoard.TextTitle = _Title.GetTheme();
_Theme.SongMenuTileBoard.StaticCoverBig = _CoverBig.GetTheme();
_Theme.SongMenuTileBoard.StaticDuetIcon = _DuetIcon.GetTheme();
_Theme.SongMenuTileBoard.StaticMedleyCalcIcon = _MedleyCalcIcon.GetTheme();
_Theme.SongMenuTileBoard.StaticMedleyTagIcon = _MedleyTagIcon.GetTheme();
_Theme.SongMenuTileBoard.StaticTextBG = _TextBG.GetTheme();
_Theme.SongMenuTileBoard.StaticVideoIcon = _VideoIcon.GetTheme();
LoadTextures();
Init();
@@ -670,15 +670,15 @@ namespace VocaluxeLib.Menu.SongMenu
{
base.LoadTextures();
_Artist = new CText(_Theme.SongMenuTileBoard.STextArtist, _PartyModeID);
_Title = new CText(_Theme.SongMenuTileBoard.STextTitle, _PartyModeID);
_SongLength = new CText(_Theme.SongMenuTileBoard.STextSongLength, _PartyModeID);
_CoverBig = new CStatic(_Theme.SongMenuTileBoard.SStaticCoverBig, _PartyModeID);
_TextBG = new CStatic(_Theme.SongMenuTileBoard.SStaticTextBG, _PartyModeID);
_DuetIcon = new CStatic(_Theme.SongMenuTileBoard.SStaticDuetIcon, _PartyModeID);
_VideoIcon = new CStatic(_Theme.SongMenuTileBoard.SStaticVideoIcon, _PartyModeID);
_MedleyCalcIcon = new CStatic(_Theme.SongMenuTileBoard.SStaticMedleyCalcIcon, _PartyModeID);
_MedleyTagIcon = new CStatic(_Theme.SongMenuTileBoard.SStaticMedleyTagIcon, _PartyModeID);
_Artist = new CText(_Theme.SongMenuTileBoard.TextArtist, _PartyModeID);
_Title = new CText(_Theme.SongMenuTileBoard.TextTitle, _PartyModeID);
_SongLength = new CText(_Theme.SongMenuTileBoard.TextSongLength, _PartyModeID);
_CoverBig = new CStatic(_Theme.SongMenuTileBoard.StaticCoverBig, _PartyModeID);
_TextBG = new CStatic(_Theme.SongMenuTileBoard.StaticTextBG, _PartyModeID);
_DuetIcon = new CStatic(_Theme.SongMenuTileBoard.StaticDuetIcon, _PartyModeID);
_VideoIcon = new CStatic(_Theme.SongMenuTileBoard.StaticVideoIcon, _PartyModeID);
_MedleyCalcIcon = new CStatic(_Theme.SongMenuTileBoard.StaticMedleyCalcIcon, _PartyModeID);
_MedleyTagIcon = new CStatic(_Theme.SongMenuTileBoard.StaticMedleyTagIcon, _PartyModeID);
Init();
}