Remove copy constructors for structs

This commit is contained in:
Flamefire committed 2014-10-16 21:38:22 +02:00
1 parent e04480171e
commit 87f3271046
13 files changed
+53 -95

No files matched your search

+2 -1
View File
@@ -298,7 +298,8 @@ namespace Vocaluxe.Screens
CStatic image = GetNewStatic(texture, new SColorF(1, 1, 1, 1), new SRectF(-1, -1, 400, 120, -4));
var particleRect = new SRectF(-1, -1, partRectSize, partRectSize, -6);
var imgDotRect = new SRectF(particleRect) {Z = -5};
SRectF imgDotRect = particleRect;
imgDotRect.Z = -5;
CStatic imgDot = GetNewStatic(texDot, new SColorF(1, 1, 1, 1), imgDotRect);
CParticleEffect particle = _GetStarParticles(partCount, isRight, particleRect, bigParticles);
+1 -1
View File
@@ -112,7 +112,7 @@ namespace VocaluxeLib.Menu
_ThemeLoaded &= success;
}
_Theme.Color.Color = new SColorF(Color);
_Theme.Color.Color = Color;
int i = 1;
+6 -6
View File
@@ -141,9 +141,9 @@ namespace VocaluxeLib.Menu
SkinSelected = button._Theme.SkinSelected
};
Rect = new SRectF(button.Rect);
Color = new SColorF(button.Color);
SelColor = new SColorF(button.Color);
Rect = button.Rect;
Color = button.Color;
SelColor = button.Color;
Texture = button.Texture;
SelTexture = button.SelTexture;
@@ -238,9 +238,9 @@ namespace VocaluxeLib.Menu
if (_ThemeLoaded)
{
_Theme.Name = elementName;
_Theme.Rect = new SRectF(Rect);
_Theme.Color.Color = new SColorF(Color);
_Theme.SelColor.Color = new SColorF(SelColor);
_Theme.Rect = Rect;
_Theme.Color.Color = Color;
_Theme.SelColor.Color = SelColor;
_Theme.Text = Text.GetTheme();
_Theme.SText = _SelText.GetTheme();
+2 -2
View File
@@ -169,8 +169,8 @@ namespace VocaluxeLib.Menu
{
_Theme.Name = elementName;
_Theme.Space = Space;
_Theme.Color.Color = new SColorF(Color);
_Theme.MaxColor.Color = new SColorF(MaxColor);
_Theme.Color.Color = Color;
_Theme.MaxColor.Color = MaxColor;
_Theme.Rect = Rect;
LoadTextures();
+3 -3
View File
@@ -164,9 +164,9 @@ namespace VocaluxeLib.Menu
if (_ThemeLoaded)
{
_Theme.Name = elementName;
_Theme.Color.Color = new SColorF(_Color);
_Theme.SColor.Color = new SColorF(_ColorProcessed);
_Theme.Rect = new SRectF(Rect);
_Theme.Color.Color = _Color;
_Theme.SColor.Color = _ColorProcessed;
_Theme.Rect = Rect;
LoadTextures();
_Text = new CText(_X, _Y, _Z, _H, _MaxW, EAlignment.Left, EStyle.Bold, "Normal", _Color, String.Empty);
+2 -3
View File
@@ -18,7 +18,6 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Xml;
using System.Xml.Serialization;
using VocaluxeLib.Draw;
using VocaluxeLib.Profile;
@@ -206,8 +205,8 @@ namespace VocaluxeLib.Menu
{
_Theme.Name = elementName;
_Theme.Rect = new SRectF(Rect);
_Theme.ColorEmptyTile.Color = new SColorF(_ColorEmptyTile);
_Theme.Rect = Rect;
_Theme.ColorEmptyTile.Color = _ColorEmptyTile;
LoadTextures();
}
+2 -2
View File
@@ -420,8 +420,8 @@ namespace VocaluxeLib.Menu
if (_ThemeLoaded)
{
_Theme.Name = elementName;
_Theme.Rect = new SRectF(Rect);
_Theme.Color.Color = new SColorF(Color);
_Theme.Rect = Rect;
_Theme.Color.Color = Color;
LoadTextures();
}
return _ThemeLoaded;
+19 -19
View File
@@ -228,18 +228,18 @@ namespace VocaluxeLib.Menu
_ThemeLoaded = false;
Rect = new SRectF(slide.Rect);
RectArrowLeft = new SRectF(slide.RectArrowLeft);
RectArrowRight = new SRectF(slide.RectArrowRight);
Rect = slide.Rect;
RectArrowLeft = slide.RectArrowLeft;
RectArrowRight = slide.RectArrowRight;
Color = new SColorF(slide.Color);
SelColor = new SColorF(slide.SelColor);
Color = slide.Color;
SelColor = slide.SelColor;
ColorArrow = new SColorF(slide.ColorArrow);
SelColorArrow = new SColorF(slide.SelColorArrow);
ColorArrow = slide.ColorArrow;
SelColorArrow = slide.SelColorArrow;
TextColor = new SColorF(slide.TextColor);
SelTextColor = new SColorF(slide.SelTextColor);
TextColor = slide.TextColor;
SelTextColor = slide.SelTextColor;
TextH = slide.TextH;
TextRelativeX = slide.TextRelativeX;
TextRelativeY = slide.TextRelativeY;
@@ -389,21 +389,21 @@ namespace VocaluxeLib.Menu
if (_ThemeLoaded)
{
_Theme.Name = elementName;
_Theme.ArrowColor.Color = new SColorF(ColorArrow);
_Theme.ArrowSColor.Color = new SColorF(SelColorArrow);
_Theme.Color.Color = new SColorF(Color);
_Theme.HColor.Color = new SColorF(HighlightColor);
_Theme.ArrowColor.Color = ColorArrow;
_Theme.ArrowSColor.Color = SelColorArrow;
_Theme.Color.Color = Color;
_Theme.HColor.Color = HighlightColor;
_Theme.NumVisible = _NumVisible;
_Theme.Rect = new SRectF(Rect);
_Theme.RectArrowLeft = new SRectF(RectArrowLeft);
_Theme.RectArrowRight = new SRectF(RectArrowRight);
_Theme.SColor.Color = new SColorF(SelColor);
_Theme.TextColor.Color = new SColorF(TextColor);
_Theme.Rect = Rect;
_Theme.RectArrowLeft = RectArrowLeft;
_Theme.RectArrowRight = RectArrowRight;
_Theme.SColor.Color = SelColor;
_Theme.TextColor.Color = TextColor;
_Theme.TextH = TextH;
_Theme.TextMaxW = MaxW;
_Theme.TextRelativeX = TextRelativeX;
_Theme.TextRelativeY = TextRelativeY;
_Theme.TextSColor.Color = new SColorF(SelTextColor);
_Theme.TextSColor.Color = SelTextColor;
LoadTextures();
}
+5 -5
View File
@@ -81,8 +81,8 @@ namespace VocaluxeLib.Menu
_PartyModeID = s._PartyModeID;
_Texture = s.Texture;
Color = new SColorF(s.Color);
Rect = new SRectF(s.Rect);
Color = s.Color;
Rect = s.Rect;
Reflection = s.Reflection;
ReflectionSpace = s.ReflectionHeight;
ReflectionHeight = s.ReflectionSpace;
@@ -130,7 +130,7 @@ namespace VocaluxeLib.Menu
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/W", ref Rect.W);
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/H", ref Rect.H);
_Theme.Rect = new SRectF(Rect);
_Theme.Rect = Rect;
if (xmlReader.GetValue(item + "/Color", out _Theme.Color.Name, String.Empty))
_ThemeLoaded &= _Theme.Color.Get(_PartyModeID, out Color);
@@ -142,7 +142,7 @@ namespace VocaluxeLib.Menu
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/A", ref Color.A);
}
_Theme.Color.Color = new SColorF(Color);
_Theme.Color.Color = Color;
if (xmlReader.ItemExists(item + "/Reflection"))
{
@@ -199,7 +199,7 @@ namespace VocaluxeLib.Menu
{
_Theme.Color.Get(_PartyModeID, out Color);
Rect = new SRectF(_Theme.Rect);
Rect = _Theme.Rect;
Reflection = _Theme.Reflection.Enabled;
if (Reflection)
{
+3 -3
View File
@@ -268,8 +268,8 @@ namespace VocaluxeLib.Menu
_ResizeAlign = text._ResizeAlign;
Font = new CFont(text.Font); //Use setter to set observer
Color = new SColorF(text.Color);
SelColor = new SColorF(text.SelColor);
Color = text.Color;
SelColor = text.SelColor;
ReflectionSpace = text.ReflectionSpace;
ReflectionHeight = text.ReflectionHeight;
@@ -300,7 +300,7 @@ namespace VocaluxeLib.Menu
_Font.Height = h;
Color = col;
SelColor = new SColorF(col);
SelColor = col;
Text = text;
+5 -3
View File
@@ -150,7 +150,7 @@ namespace VocaluxeLib.Menu.SingNotes
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + target + "W", ref BarPos[player, numplayer].W);
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + target + "H", ref BarPos[player, numplayer].H);
_Theme.BarPos[i].Name = "P" + (player + 1) + "N" + (numplayer + 1);
_Theme.BarPos[i].Rect = new SRectF(BarPos[player, numplayer]);
_Theme.BarPos[i].Rect = BarPos[player, numplayer];
i++;
}
}
@@ -357,7 +357,8 @@ namespace VocaluxeLib.Menu.SingNotes
if (note.EndBeat >= CBase.Game.GetRecordedBeat() && note.Hit && note.HitNote.Type == ENoteType.Golden)
{
var re = new SRectF(rect) {W = (CBase.Game.GetMidRecordedBeat() - note.StartBeat) / beats * w};
SRectF re = rect;
re.W = (CBase.Game.GetMidRecordedBeat() - note.StartBeat) / beats * w;
_AddFlare(re, n);
}
@@ -524,7 +525,8 @@ namespace VocaluxeLib.Menu.SingNotes
private static void _DrawNoteLines(SRectF rect, SColorF color)
{
SRectF lineRect = new SRectF(rect) {H = 1.5f};
SRectF lineRect = rect;
lineRect.H = 1.5f;
for (int i = 0; i < CBase.Settings.GetNumNoteLines(); i++)
{
lineRect.Y = rect.Y + rect.H / CBase.Settings.GetNumNoteLines() * (i + 1);
@@ -41,19 +41,6 @@ namespace VocaluxeLib.Menu.SongMenu
//public SThemeSongMenuDreidel songMenuDreidel;
//public SThemeSongMenuList songMenuList;
public SThemeSongMenuTileBoard SongMenuTileBoard;
public SThemeSongMenu(SThemeSongMenu theme)
{
Name = theme.Name;
CoverBackground = theme.CoverBackground;
CoverBigBackground = theme.CoverBigBackground;
DuetIcon = theme.DuetIcon;
VideoIcon = theme.VideoIcon;
MedleyCalcIcon = theme.MedleyCalcIcon;
MedleyTagIcon = theme.MedleyTagIcon;
Color = new SThemeColor(theme.Color);
SongMenuTileBoard = theme.SongMenuTileBoard;
}
}
public struct SThemeSongMenuTileBoard
@@ -179,7 +166,7 @@ namespace VocaluxeLib.Menu.SongMenu
{
Visible = true;
_PartyModeID = partyModeID;
_Theme = new SThemeSongMenu(theme);
_Theme = theme;
LoadTextures();
}
@@ -192,7 +179,7 @@ namespace VocaluxeLib.Menu.SongMenu
public SThemeSongMenu GetTheme()
{
return new SThemeSongMenu(_Theme);
return _Theme;
}
public virtual bool LoadTheme(string xmlPath, string elementName, CXMLReader xmlReader)
@@ -216,7 +203,7 @@ namespace VocaluxeLib.Menu.SongMenu
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/B", ref _ColorInternal.B);
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/A", ref _ColorInternal.A);
}
_Theme.Color.Color = new SColorF(_ColorInternal);
_Theme.Color.Color = _ColorInternal;
#region SongMenuTileBoard
_ThemeLoaded &= xmlReader.TryGetIntValue(item + "/SongMenuTileBoard/NumW", ref _Theme.SongMenuTileBoard.NumW);
-31
View File
@@ -91,14 +91,6 @@ namespace VocaluxeLib
A = a;
}
public SColorF(SColorF color)
{
R = color.R;
G = color.G;
B = color.B;
A = color.A;
}
[Pure]
public Color AsColor()
{
@@ -123,12 +115,6 @@ namespace VocaluxeLib
get { return !String.IsNullOrEmpty(Name); }
}
public SThemeColor(SThemeColor theme)
{
Color = new SColorF(theme.Color);
Name = theme.Name;
}
public bool Get(int partyModeId, out SColorF color)
{
if (String.IsNullOrEmpty(Name))
@@ -176,16 +162,6 @@ namespace VocaluxeLib
Rotation = 0f;
}
public SRectF(SRectF rect)
{
X = rect.X;
Y = rect.Y;
W = rect.W;
H = rect.H;
Z = rect.Z;
Rotation = 0f;
}
public SRectF(Rectangle rect)
{
X = rect.X;
@@ -220,13 +196,6 @@ namespace VocaluxeLib
Height = height;
Space = space;
}
public SReflection(SReflection refl)
{
Enabled = refl.Enabled;
Height = refl.Height;
Space = refl.Space;
}
}
public struct SPoint3F