1 using Microsoft.Xna.Framework;
2 using Microsoft.Xna.Framework.Graphics;
4 namespace Loot.UI.Common.Controls.Button
6 internal class GuiButton : GuiFramedElement
8 protected const int WIDTH = 50;
9 protected const int HEIGHT = 50;
11 internal enum ButtonType
19 private static Texture2D _texture => Assets.Textures.GUI.ButtonTexture;
20 protected ButtonType _buttonType;
22 internal GuiButton(ButtonType buttonType) : base(new Vector2(WIDTH, HEIGHT), new Vector2(10, 10))
24 _buttonType = buttonType;
27 private Rectangle GetDrawRectangle()
31 case ButtonType.StoneInnerBevel:
32 return new Rectangle(0, 0, WIDTH, HEIGHT);
33 case ButtonType.StoneOuterBevel:
34 return new Rectangle(WIDTH, 0, WIDTH, HEIGHT);
35 case ButtonType.Parchment:
37 return new Rectangle(2 * WIDTH, 0, WIDTH, HEIGHT);
41 protected override void DrawSelf(SpriteBatch spriteBatch)
44 if (_buttonType != ButtonType.None)
48 GetOuterDimensions().Position(),