Exemplo n.º 1
0
Arquivo: GUI.cs Projeto: Fractaos/LD41
 public UiButton(Vector2 position, int width, int height, Color normalColor, Color survoledColor, WhenPressed action, Texture2D texture = null) : base(position)
 {
     _bounds             = new Rectangle((int)position.X, (int)position.Y, width, height);
     this._normalColor   = normalColor;
     this._survoledColor = survoledColor;
     this._action        = action;
     if (texture != null)
     {
         this._texture = texture;
     }
     else
     {
         _texture = Utils.CreateTexture(width, height, normalColor);
     }
 }
Exemplo n.º 2
0
Arquivo: GUI.cs Projeto: Fractaos/LD41
 public UiButton(Vector2 position, int width, int height, WhenPressed action, Color color) : base(position)
 {
     _texture     = Utils.CreateTexture(width, height, color);
     _bounds      = new Rectangle((int)position.X, (int)position.Y, width, height);
     this._action = action;
 }
Exemplo n.º 3
0
Arquivo: GUI.cs Projeto: Fractaos/LD41
 public UiButton(Vector2 position, WhenPressed action, Texture2D texture) : base(position)
 {
     _action  = action;
     _texture = texture;
     _bounds  = new Rectangle((int)position.X, (int)position.Y, _texture.Width, _texture.Height);
 }