C# Class Gruppe22.Client.Button

Inheritance: UIElement, IDisposable
Show file Open project: propra13-orga/gruppe22 Class Usage Examples

Public Methods

Method Description
Button ( Backend parent, SpriteBatch spriteBatch, Microsoft.Xna.Framework.Content.ContentManager content, Rectangle displayRect, string label, int id, bool staydown = false ) : System

Create a button using a text label

Button ( Backend parent, SpriteBatch spriteBatch, Microsoft.Xna.Framework.Content.ContentManager content, Rectangle displayRect, string normal, string active, string pressed, int id ) : System

Create a button using a bitmap

Dispose ( ) : void
Draw ( GameTime gameTime ) : void

HandleEvent ( bool downstream, Backend eventID ) : void
Hide ( ) : void
OnKeyDown ( Keys k ) : bool
OnMouseDown ( int button ) : bool

Show ( ) : void

Method Details

Button() public method

Create a button using a text label
public Button ( Backend parent, SpriteBatch spriteBatch, Microsoft.Xna.Framework.Content.ContentManager content, Rectangle displayRect, string label, int id, bool staydown = false ) : System
parent Backend
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
content Microsoft.Xna.Framework.Content.ContentManager
displayRect Microsoft.Xna.Framework.Rectangle
label string
id int
staydown bool
return System

Button() public method

Create a button using a bitmap
public Button ( Backend parent, SpriteBatch spriteBatch, Microsoft.Xna.Framework.Content.ContentManager content, Rectangle displayRect, string normal, string active, string pressed, int id ) : System
parent Backend
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
content Microsoft.Xna.Framework.Content.ContentManager
displayRect Microsoft.Xna.Framework.Rectangle
normal string
active string
pressed string
id int
return System

Dispose() public method

public Dispose ( ) : void
return void

Draw() public method

public Draw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
return void

HandleEvent() public method

public HandleEvent ( bool downstream, Backend eventID ) : void
downstream bool
eventID Backend
return void

Hide() public method

public Hide ( ) : void
return void

OnKeyDown() public method

public OnKeyDown ( Keys k ) : bool
k Keys
return bool

OnMouseDown() public method

public OnMouseDown ( int button ) : bool
button int
return bool

Show() public method

public Show ( ) : void
return void