Merge branch 'develop' of git://github.com/flokuep/Vocaluxe into Better_Graphics_Handling
Conflicts: Vocaluxe/COSFunctions.cs VocaluxeLib/CHelper.cs VocaluxeLib/Menu/CStatic.cs VocaluxeLib/Structs.cs
This commit is contained in:
commit
c156fa69ab
550 files changed
+22434
-23687
No files matched your search
+64
-5
@@ -18,8 +18,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.Contracts;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using System.Xml.Serialization;
|
||||
using VocaluxeLib.Songs;
|
||||
|
||||
namespace VocaluxeLib
|
||||
@@ -28,10 +30,10 @@ namespace VocaluxeLib
|
||||
#region Drawing
|
||||
public struct SColorF
|
||||
{
|
||||
public float R;
|
||||
public float G;
|
||||
public float B;
|
||||
public float A;
|
||||
[XmlElement("R")] public float R;
|
||||
[XmlElement("G")] public float G;
|
||||
[XmlElement("B")] public float B;
|
||||
[XmlElement("A")] public float A;
|
||||
|
||||
public SColorF(float r, float g, float b, float a)
|
||||
{
|
||||
@@ -51,12 +53,37 @@ namespace VocaluxeLib
|
||||
A = color.A;
|
||||
}
|
||||
|
||||
[Pure]
|
||||
public Color AsColor()
|
||||
{
|
||||
return Color.FromArgb((int)(A * 255), (int)(R * 255), (int)(G * 255), (int)(B * 255));
|
||||
}
|
||||
}
|
||||
|
||||
//Use for holding theme-colors
|
||||
[XmlRoot("Color")]
|
||||
public struct SThemeColor
|
||||
{
|
||||
public SColorF Color;
|
||||
public string Name;
|
||||
|
||||
//Needed for serialization
|
||||
public bool ColorSpecified
|
||||
{
|
||||
get { return String.IsNullOrEmpty(Name); }
|
||||
}
|
||||
public bool NameSpecified
|
||||
{
|
||||
get { return !String.IsNullOrEmpty(Name); }
|
||||
}
|
||||
|
||||
public SThemeColor(SThemeColor theme)
|
||||
{
|
||||
Color = new SColorF(theme.Color);
|
||||
Name = theme.Name;
|
||||
}
|
||||
}
|
||||
|
||||
public struct SRectF
|
||||
{
|
||||
public float X;
|
||||
@@ -64,7 +91,7 @@ namespace VocaluxeLib
|
||||
public float W;
|
||||
public float H;
|
||||
public float Z;
|
||||
public float Rotation; //0..360°
|
||||
[XmlIgnore] public float Rotation; //0..360°
|
||||
|
||||
public float Right
|
||||
{
|
||||
@@ -114,6 +141,38 @@ namespace VocaluxeLib
|
||||
}
|
||||
}
|
||||
|
||||
[XmlRoot("Reflection")]
|
||||
public struct SReflection
|
||||
{
|
||||
[XmlAttribute(AttributeName = "Enabled")] public bool Enabled;
|
||||
public float Height;
|
||||
public float Space;
|
||||
|
||||
//Needed for serialization
|
||||
public bool HeightSpecified
|
||||
{
|
||||
get { return Enabled; }
|
||||
}
|
||||
public bool SpaceSpecified
|
||||
{
|
||||
get { return Enabled; }
|
||||
}
|
||||
|
||||
public SReflection(bool enabled, float height, float space)
|
||||
{
|
||||
Enabled = enabled;
|
||||
Height = height;
|
||||
Space = space;
|
||||
}
|
||||
|
||||
public SReflection(SReflection refl)
|
||||
{
|
||||
Enabled = refl.Enabled;
|
||||
Height = refl.Height;
|
||||
Space = refl.Space;
|
||||
}
|
||||
}
|
||||
|
||||
public struct SPoint3F
|
||||
{
|
||||
public float X;
|
||||
|
||||
Reference in new issue
Block a user