From 29daabdaf6f69e1c5c3270bf268466e91c2155e0 Mon Sep 17 00:00:00 2001 From: Harrison Date: Sun, 24 Nov 2019 16:20:26 -0500 Subject: [PATCH] Further minor import clean up. --- RecrownedAthenaeum/Data/SkinData.cs | 9 +++++---- RecrownedAthenaeum/Render/BasicScissor.cs | 8 +------- RecrownedAthenaeum/Render/ConsistentSpriteBatch.cs | 5 +---- RecrownedAthenaeum/Types/Color.cs | 10 +++++++++- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/RecrownedAthenaeum/Data/SkinData.cs b/RecrownedAthenaeum/Data/SkinData.cs index 701df1c..def7933 100644 --- a/RecrownedAthenaeum/Data/SkinData.cs +++ b/RecrownedAthenaeum/Data/SkinData.cs @@ -1,4 +1,5 @@ using RecrownedAthenaeum.UI.SkinSystem.Definitions; +using RecrownedAthenaeum.Types; namespace RecrownedAthenaeum.Data { @@ -76,10 +77,10 @@ namespace RecrownedAthenaeum.Data public ColorData(string name, Color color) { this.name = name; - r = color.R; - g = color.G; - b = color.B; - a = color.A; + r = color.r; + g = color.g; + b = color.b; + a = color.a; } } diff --git a/RecrownedAthenaeum/Render/BasicScissor.cs b/RecrownedAthenaeum/Render/BasicScissor.cs index 19cf022..2f06b9a 100644 --- a/RecrownedAthenaeum/Render/BasicScissor.cs +++ b/RecrownedAthenaeum/Render/BasicScissor.cs @@ -1,10 +1,4 @@ -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using RecrownedAthenaeum.Types; namespace RecrownedAthenaeum.Render { diff --git a/RecrownedAthenaeum/Render/ConsistentSpriteBatch.cs b/RecrownedAthenaeum/Render/ConsistentSpriteBatch.cs index 376f7bf..49197ba 100644 --- a/RecrownedAthenaeum/Render/ConsistentSpriteBatch.cs +++ b/RecrownedAthenaeum/Render/ConsistentSpriteBatch.cs @@ -1,7 +1,4 @@ -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; - -namespace RecrownedAthenaeum.Render +namespace RecrownedAthenaeum.Render { /// /// A that keeps it's settings through begin and end unless manually changed either by the or through changing the fields. Note that changing the fields while the batch has begun will not take effect until the next time the batch is started. diff --git a/RecrownedAthenaeum/Types/Color.cs b/RecrownedAthenaeum/Types/Color.cs index 242e113..f1abdfc 100644 --- a/RecrownedAthenaeum/Types/Color.cs +++ b/RecrownedAthenaeum/Types/Color.cs @@ -3,7 +3,7 @@ namespace RecrownedAthenaeum.Types { public struct Color { - public byte r, g, b; + public byte r, g, b, a; public float R { set { r = (byte)Math.Min(Math.Round(Byte.MaxValue * value), Byte.MaxValue); @@ -28,5 +28,13 @@ namespace RecrownedAthenaeum.Types return g / (float)(byte.MaxValue); } } + public float A { + set { + a = (byte)Math.Min(Math.Round(Byte.MaxValue * value), Byte.MaxValue); + } + get { + return a / (float)(byte.MaxValue); + } + } } } \ No newline at end of file