C# Class Gruppe22.Client.UIElement

Inheritance: Backend.IHandleEvent, IDisposable, IKeyHandler
Show file Open project: propra13-orga/gruppe22 Class Usage Examples

Protected Properties

Property Type Description
_content Microsoft.Xna.Framework.Content.ContentManager
_displayRect Microsoft.Xna.Framework.Rectangle
_focus bool
_parent Backend.IHandleEvent
_spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
_visible bool

Public Methods

Method Description
Click ( int Button ) : void

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

HandleEvent ( bool DownStream, Backend eventID ) : void
Hide ( ) : void
IsHit ( int x, int y ) : bool

Check whether a pixel is part of the window

MoveContent ( Vector2 difference, int _lastCheck ) : void

OnKeyDown ( Keys k ) : bool
OnKeyHeld ( Keys k ) : bool
OnKeyUp ( Keys k ) : bool
OnMouseDown ( int button ) : bool
OnMouseHeld ( int button ) : bool
OnMouseUp ( int button ) : bool
Resize ( Rectangle rect ) : void
ScrollWheel ( int Difference ) : void

Show ( ) : void
UIElement ( Backend parent, SpriteBatch spriteBatch, Microsoft.Xna.Framework.Content.ContentManager content, Rectangle displayRect ) : System

Update ( GameTime gameTime ) : void

Method Details

Click() public method

public Click ( int Button ) : void
Button int
return void

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

IsHit() public method

Check whether a pixel is part of the window
public IsHit ( int x, int y ) : bool
x int Horizontal coordinate
y int Vertical coordinate
return bool

MoveContent() public method

public MoveContent ( Vector2 difference, int _lastCheck ) : void
difference Vector2
_lastCheck int
return void

OnKeyDown() public method

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

OnKeyHeld() public method

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

OnKeyUp() public method

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

OnMouseDown() public method

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

OnMouseHeld() public method

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

OnMouseUp() public method

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

Resize() public method

public Resize ( Rectangle rect ) : void
rect Microsoft.Xna.Framework.Rectangle
return void

ScrollWheel() public method

public ScrollWheel ( int Difference ) : void
Difference int
return void

Show() public method

public Show ( ) : void
return void

UIElement() public method

public UIElement ( Backend parent, SpriteBatch spriteBatch, Microsoft.Xna.Framework.Content.ContentManager content, Rectangle displayRect ) : System
parent Backend
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
content Microsoft.Xna.Framework.Content.ContentManager
displayRect Microsoft.Xna.Framework.Rectangle
return System

Update() public method

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

Property Details

_content protected property

A reference to the game's Contentmanager
protected ContentManager,Microsoft.Xna.Framework.Content _content
return Microsoft.Xna.Framework.Content.ContentManager

_displayRect protected property

The area used for the element
protected Rectangle,Microsoft.Xna.Framework _displayRect
return Microsoft.Xna.Framework.Rectangle

_focus protected property

protected bool _focus
return bool

_parent protected property

protected Backend.IHandleEvent _parent
return Backend.IHandleEvent

_spriteBatch protected property

Central Sprite drawing algorithm
protected SpriteBatch,Microsoft.Xna.Framework.Graphics _spriteBatch
return Microsoft.Xna.Framework.Graphics.SpriteBatch

_visible protected property

protected bool _visible
return bool