C# Class Gonzo.Elements.UIElement

UIElement is the base class for all UI related elements (UIButton, UIControl, UIDialog, UIImage, UILabel, UISlider, UITextEdit).
Afficher le fichier Open project: Afr0Games/Project-Dollhouse Class Usage Examples

Méthodes publiques

Свойство Type Description
Image UIImage
Name string
TextDrawingColor Color
Tracking int
Visible bool

Protected Properties

Свойство Type Description
m_Font Microsoft.Xna.Framework.Graphics.SpriteFont
m_HasFocus bool
m_ID int
m_KeyboardInput bool
m_Opaque bool
m_Parent UIElement
m_Screen UIScreen
m_Size Vector2

Méthodes publiques

Méthode Description
Draw ( SpriteBatch SBatch, Rectangle SourceRect, float LayerDepth ) : void

Handles drawing logic for this UIElement.

Draw ( SpriteBatch SBatch, Rectangle SourceRect, float LayerDepth, Vector2 ScaleFactor ) : void

Handles drawing logic for this UIElement.

Draw ( SpriteBatch SBatch, float LayerDepth ) : void

Handles drawing logic for this UIElement.

GetLayerDepth ( LayerDepth Depth ) : float

Gets the value of the corresponding layer depth.

IsMouseOver ( InputHelper Input ) : bool

Returns true if the mouse is over this UIElement. Does NOT work for pixel-perfect collision.

MouseEvents ( InputHelper Helper ) : void

Mouse interacted with this UIElement.

UIElement ( UIScreen Screen, UIElement Parent = null, string Path = "" ) : System

Constructs a UIElement from a Screen instance and an optional UIElement that acts as a parent.

UIElement ( string Name, Vector2 Position, Vector2 Size, UIScreen Screen, UIElement Parent = null ) : System
Update ( InputHelper Helper, GameTime GTime ) : void

Handles update logic for this UIElement.

Méthodes protégées

Méthode Description
PixelCheck ( InputHelper Input, int Width ) : bool

Method Details

Draw() public méthode

Handles drawing logic for this UIElement.
public Draw ( SpriteBatch SBatch, Rectangle SourceRect, float LayerDepth ) : void
SBatch Microsoft.Xna.Framework.Graphics.SpriteBatch A SpriteBatch instance.
SourceRect Microsoft.Xna.Framework.Rectangle A source rectangle, for controlling which part of this elenent's texture is drawn.
LayerDepth float Depth at which to draw, may be null.
Résultat void

Draw() public méthode

Handles drawing logic for this UIElement.
public Draw ( SpriteBatch SBatch, Rectangle SourceRect, float LayerDepth, Vector2 ScaleFactor ) : void
SBatch Microsoft.Xna.Framework.Graphics.SpriteBatch A SpriteBatch instance.
SourceRect Microsoft.Xna.Framework.Rectangle A source rectangle, for controlling which part of this elenent's texture is drawn.
LayerDepth float Depth at which to draw, may be null.
ScaleFactor Vector2 Scale at which to draw, may be null.
Résultat void

Draw() public méthode

Handles drawing logic for this UIElement.
public Draw ( SpriteBatch SBatch, float LayerDepth ) : void
SBatch Microsoft.Xna.Framework.Graphics.SpriteBatch A SpriteBatch instance.
LayerDepth float Depth at which to draw, may be null.
Résultat void

GetLayerDepth() public static méthode

Gets the value of the corresponding layer depth.
public static GetLayerDepth ( LayerDepth Depth ) : float
Depth LayerDepth The depth for which to retrieve a value.
Résultat float

IsMouseOver() public méthode

Returns true if the mouse is over this UIElement. Does NOT work for pixel-perfect collision.
public IsMouseOver ( InputHelper Input ) : bool
Input InputHelper
Résultat bool

MouseEvents() public méthode

Mouse interacted with this UIElement.
public MouseEvents ( InputHelper Helper ) : void
Helper InputHelper InputHelper instance for input data.
Résultat void

PixelCheck() protected méthode

protected PixelCheck ( InputHelper Input, int Width ) : bool
Input InputHelper
Width int
Résultat bool

UIElement() public méthode

Constructs a UIElement from a Screen instance and an optional UIElement that acts as a parent.
public UIElement ( UIScreen Screen, UIElement Parent = null, string Path = "" ) : System
Screen UIScreen A Screen instance.
Parent UIElement (Optional) UIElement that acts as a parent.
Path string (Optional) Path to a UI script that will create this UI element.
Résultat System

UIElement() public méthode

public UIElement ( string Name, Vector2 Position, Vector2 Size, UIScreen Screen, UIElement Parent = null ) : System
Name string
Position Vector2
Size Vector2
Screen UIScreen
Parent UIElement
Résultat System

Update() public méthode

Handles update logic for this UIElement.
public Update ( InputHelper Helper, GameTime GTime ) : void
Helper InputHelper InputHelper instance for input data.
GTime Microsoft.Xna.Framework.GameTime
Résultat void

Property Details

Image public_oe property

public UIImage,Gonzo.Elements Image
Résultat UIImage

Name public_oe property

public string Name
Résultat string

TextDrawingColor public_oe property

public Color TextDrawingColor
Résultat Color

Tracking public_oe property

public int Tracking
Résultat int

Visible public_oe property

public bool Visible
Résultat bool

m_Font protected_oe property

protected SpriteFont,Microsoft.Xna.Framework.Graphics m_Font
Résultat Microsoft.Xna.Framework.Graphics.SpriteFont

m_HasFocus protected_oe property

protected bool m_HasFocus
Résultat bool

m_ID protected_oe property

protected int m_ID
Résultat int

m_KeyboardInput protected_oe property

protected bool m_KeyboardInput
Résultat bool

m_Opaque protected_oe property

protected bool m_Opaque
Résultat bool

m_Parent protected_oe property

protected UIElement,Gonzo.Elements m_Parent
Résultat UIElement

m_Screen protected_oe property

protected UIScreen m_Screen
Résultat UIScreen

m_Size protected_oe property

protected Vector2 m_Size
Résultat Vector2