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.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;
}
}

View File

@ -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
{

View File

@ -1,7 +1,4 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
namespace RecrownedAthenaeum.Render
namespace RecrownedAthenaeum.Render
{
/// <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.

View File

@ -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);
}
}
}
}