Further minor import clean up.

This commit is contained in:
Harrison Deng 2019-11-24 16:20:26 -05:00
parent 14ee906edd
commit 29daabdaf6
4 changed files with 16 additions and 16 deletions

View File

@ -1,4 +1,5 @@
using RecrownedAthenaeum.UI.SkinSystem.Definitions; using RecrownedAthenaeum.UI.SkinSystem.Definitions;
using RecrownedAthenaeum.Types;
namespace RecrownedAthenaeum.Data namespace RecrownedAthenaeum.Data
{ {
@ -76,10 +77,10 @@ namespace RecrownedAthenaeum.Data
public ColorData(string name, Color color) public ColorData(string name, Color color)
{ {
this.name = name; this.name = name;
r = color.R; r = color.r;
g = color.G; g = color.g;
b = color.B; b = color.b;
a = color.A; a = color.a;
} }
} }

View File

@ -1,10 +1,4 @@
using Microsoft.Xna.Framework; using RecrownedAthenaeum.Types;
using Microsoft.Xna.Framework.Graphics;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RecrownedAthenaeum.Render namespace RecrownedAthenaeum.Render
{ {

View File

@ -1,7 +1,4 @@
using Microsoft.Xna.Framework; namespace RecrownedAthenaeum.Render
using Microsoft.Xna.Framework.Graphics;
namespace RecrownedAthenaeum.Render
{ {
/// <summary> /// <summary>
/// A <see cref="SpriteBatch"/> that keeps it's settings through begin and end unless manually changed either by the <see cref="Begin(SpriteSortMode, BlendState, SamplerState, DepthStencilState, RasterizerState, Effect, Matrix?)"/> 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. /// A <see cref="SpriteBatch"/> that keeps it's settings through begin and end unless manually changed either by the <see cref="Begin(SpriteSortMode, BlendState, SamplerState, DepthStencilState, RasterizerState, Effect, Matrix?)"/> 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.

View File

@ -3,7 +3,7 @@ namespace RecrownedAthenaeum.Types
{ {
public struct Color public struct Color
{ {
public byte r, g, b; public byte r, g, b, a;
public float R { public float R {
set { set {
r = (byte)Math.Min(Math.Round(Byte.MaxValue * value), Byte.MaxValue); r = (byte)Math.Min(Math.Round(Byte.MaxValue * value), Byte.MaxValue);
@ -28,5 +28,13 @@ namespace RecrownedAthenaeum.Types
return g / (float)(byte.MaxValue); 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);
}
}
} }
} }