1
0
Fork 0
This repository has been archived on 2019-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
Galactic_Colors_Control/Galactic Colors Control GUI/GUI/Texture.cs

27 lines
679 B
C#

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
namespace Galactic_Colors_Control_GUI.GUI
{
class Texture : Element
{
protected Colors _colors;
protected Texture2D _sprite;
public Texture() { }
public Texture(Rectangle pos ,Texture2D sprite, Colors colors)
{
_pos = pos;
_sprite = sprite;
_colors = colors;
}
public override void Draw(SpriteBatch spriteBatch)
{
Color backColor = _isFocus ? _colors._focus : (_isHover ? _colors._hover : _colors._normal);
spriteBatch.Draw(_sprite, _pos, backColor);
}
}
}