refactoring; removed configuration setup; added consistent sprite batch; got rid of sprite batch settings; implemented newer setup;

This commit is contained in:
2019-03-23 19:04:43 -05:00
parent e3535f5662
commit b045033b25
28 changed files with 342 additions and 329 deletions

View File

@@ -1,5 +1,6 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using RecrownedAthenaeum.Render;
using RecrownedAthenaeum.SpecialTypes;
using System;
@@ -49,7 +50,7 @@ namespace RecrownedAthenaeum.UI.Modular.Modules
/// Draws the image with default values.
/// </summary>
/// <param name="batch">The batch to use.</param>
public override void Draw(SpriteBatch batch)
public override void Draw(ConsistentSpriteBatch batch)
{
batch.Draw(texture, situation, null, color, rotation, origin, SpriteEffects.None, 0f);
base.Draw(batch);
@@ -63,7 +64,7 @@ namespace RecrownedAthenaeum.UI.Modular.Modules
/// <param name="color">The color tint to use.</param>
/// <param name="rotation">Rotation of image.</param>
/// <param name="origin">Origin for the rotation.</param>
public void Draw(SpriteBatch spriteBatch, Rectangle destination, Color color, float rotation = 0, Vector2 origin = default(Vector2))
public void Draw(ConsistentSpriteBatch spriteBatch, Rectangle destination, Color color, float rotation = 0, Vector2 origin = default(Vector2))
{
this.color = color;
this.rotation = rotation;

View File

@@ -4,6 +4,7 @@ using RecrownedAthenaeum.SpecialTypes;
using RecrownedAthenaeum.Input;
using RecrownedAthenaeum.UI.SkinSystem.Definitions;
using RecrownedAthenaeum.UI.SkinSystem;
using RecrownedAthenaeum.Render;
namespace RecrownedAthenaeum.UI.Modular.Modules.Interactive
{
@@ -80,7 +81,7 @@ namespace RecrownedAthenaeum.UI.Modular.Modules.Interactive
/// Draws the button.
/// </summary>
/// <param name="batch">Batch used to draw the button.</param>
public override void Draw(SpriteBatch batch)
public override void Draw(ConsistentSpriteBatch batch)
{
if (disabled)
{

View File

@@ -1,5 +1,6 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using RecrownedAthenaeum.Render;
using RecrownedAthenaeum.SpecialTypes;
using RecrownedAthenaeum.UI.SkinSystem;
using RecrownedAthenaeum.UI.SkinSystem.Definitions;
@@ -84,7 +85,7 @@ namespace RecrownedAthenaeum.UI.Modular.Modules.Interactive
/// Called whenever game wants to render this button.
/// </summary>
/// <param name="batch">Batch to use. Batch should already be started.</param>
public override void Draw(SpriteBatch batch)
public override void Draw(ConsistentSpriteBatch batch)
{
base.Draw(batch);
text.Draw(batch);

View File

@@ -1,5 +1,6 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using RecrownedAthenaeum.Render;
using System;
using System.Text;
@@ -80,7 +81,7 @@ namespace RecrownedAthenaeum.UI.Modular.Modules
/// Draws the text.
/// </summary>
/// <param name="batch">Batch to use.</param>
public override void Draw(SpriteBatch batch)
public override void Draw(ConsistentSpriteBatch batch)
{
batch.DrawString(font, Content, position, color, 0f, default(Vector2), scale, SpriteEffects.None, 0f);
base.Draw(batch);