C# Class XNAInterfaceComponents.Components.Component

Inheritance: Drawable, MouseOverable
Mostra file Open project: Wotuu/RTS_XNA_v2 Class Usage Examples

Public Methods

Method Description
Component ( ParentComponent parent, Rectangle bounds ) : System
Draw ( SpriteBatch sb ) : void
GetDepth ( ) : int

Gets the depth of this component.

GetLocation ( ) : Point

Gets the location relative to the parent.

GetScreenBounds ( ) : Rectangle

Gets the location on the screen of this component.

OnMouseEnter ( MouseEvent e ) : void
OnMouseExit ( MouseEvent e ) : void
Unload ( ) : void
Update ( ) : void

Protected Methods

Method Description
GetDrawDepthOffset ( ) : float

Takes the depth of this component, and multiplies it by 0.01f to get a value which you can use to draw the component at the correct depth on the screen.

Method Details

Component() public method

public Component ( ParentComponent parent, Rectangle bounds ) : System
parent XNAInterfaceComponents.AbstractComponents.ParentComponent
bounds Microsoft.Xna.Framework.Rectangle
return System

Draw() public abstract method

public abstract Draw ( SpriteBatch sb ) : void
sb Microsoft.Xna.Framework.Graphics.SpriteBatch
return void

GetDepth() public method

Gets the depth of this component.
public GetDepth ( ) : int
return int

GetDrawDepthOffset() protected method

Takes the depth of this component, and multiplies it by 0.01f to get a value which you can use to draw the component at the correct depth on the screen.
protected GetDrawDepthOffset ( ) : float
return float

GetLocation() public method

Gets the location relative to the parent.
public GetLocation ( ) : Point
return Point

GetScreenBounds() public method

Gets the location on the screen of this component.
public GetScreenBounds ( ) : Rectangle
return Microsoft.Xna.Framework.Rectangle

OnMouseEnter() public abstract method

public abstract OnMouseEnter ( MouseEvent e ) : void
e MouseEvent
return void

OnMouseExit() public abstract method

public abstract OnMouseExit ( MouseEvent e ) : void
e MouseEvent
return void

Unload() public abstract method

public abstract Unload ( ) : void
return void

Update() public abstract method

public abstract Update ( ) : void
return void