Property | Type | Description | |
---|---|---|---|
MASK_COLORS | uint[] | ||
Visible | bool |
Property | Type | Description | |
---|---|---|---|
_BlendColor | Color | ||
_HasOpacity | bool | ||
_Mtx | float[] | ||
_MtxDirty | bool | ||
_Opacity | float | ||
_OpacityDirty | bool | ||
_Parent | |||
_Scale | Vector2 | ||
_ScaleParent | Vector2 | ||
_ScaleX | float | ||
_ScaleY | float | ||
_Tooltip | string | ||
_X | float | ||
_Y | float | ||
m_StringID | string |
Property | Type | Description |
---|
Method | Description | |
---|---|---|
AddUpdateHook ( UpdateHookDelegate hook ) : void |
Adds a callback that will be executed every update loop.
|
|
Async ( AsyncHandler handler ) : void |
Little utility to make it easier to do work outside of the UI thread
|
|
Draw ( FSO.Client.UI.Framework.UISpriteBatch batch ) : void |
Basic draw method. Your component should implement this and add any drawing behavior it needs.
|
|
DrawLocalString ( |
This utility will draw a line of text onto the UIElement.
|
|
DrawLocalString ( |
This utility will draw a line of text onto the UIElement.
|
|
DrawLocalString ( |
This utility will draw a line of text onto the UIElement.
|
|
DrawLocalString ( |
This utility will draw a line of text onto the UIElement.
|
|
DrawLocalTexture ( |
Draws a texture to the UIElement. This method will deal with the matrix calculations
|
|
DrawLocalTexture ( |
Draws a texture to the UIElement. This method will deal with the matrix calculations
|
|
DrawLocalTexture ( |
Draws a texture to the UIElement. This method will deal with the matrix calculations
|
|
DrawLocalTexture ( |
Draws a texture to the UIElement. This method will deal with the matrix calculations
|
|
DrawTiledTexture ( |
||
FlooredLocalPoint ( Vector2 point ) : Vector2 | ||
GetBounds ( ) : |
Gets the bounding box for the component
|
|
GetMousePosition ( Microsoft.Xna.Framework.Input.MouseState mouse ) : Vector2 |
Gets the local mouse coordinates for the given mouse state
|
|
GetTexture ( |
||
GetTexture ( ulong id ) : Microsoft.Xna.Framework.Graphics.Texture2D | ||
GlobalPoint ( Vector2 globalPoint ) : Vector2 |
Converts a point relative to the screen into a point relative to this component
|
|
HitTestArea ( UpdateState state, |
Returns true if the mouse is over the given area
|
|
InvalidateMatrix ( ) : void |
Utility to force the component to recalculate its matrix
|
|
InvalidateOpacity ( ) : void |
Utility to force the component to recalculate its blend colour
|
|
ListenForMouse ( |
||
LocalPoint ( Vector2 point ) : Vector2 |
Converts a point relative to this UIElement into a point relative to the screen
|
|
LocalPoint ( float x, float y ) : Vector2 |
Converts a point relative to this UIElement into a point relative to the screen
|
|
LocalRect ( float x, float y, float w, float h ) : |
Converts a rectangle relative to this UIElement into a rectangle relative to the screen.
|
|
LocalRect ( float x, float y, float w, float h, float mtx ) : |
Converts a rectangle relative to this UIElement into a rectangle relative to the screen.
|
|
PreDraw ( FSO.Client.UI.Framework.UISpriteBatch batch ) : void |
May be removed - Called before the draw method.
|
|
RemoveMouseListener ( |
||
RemoveUpdateHook ( UpdateHookDelegate hook ) : void |
Removes a previously added update hook.
|
|
StoreTexture ( ulong id, |
||
StoreTexture ( ulong id, |
||
ToString ( ) : string | ||
Update ( UpdateState state ) : void |
Standard UIElement update method. All sub-classes should call this super method. The argument is an UpdateState object, this object contains everything you may need during update including GameTime, MouseState, KeyboardState etc. This is useful because it means we dont ask for Mouse & Keyboard state in every UIElement which would be wasteful
|
|
WillDraw ( ) : bool |
Scans through parents to determine if this element will be drawn.
|
Method | Description | |
---|---|---|
CalculateMatrix ( ) : void |
Calculate a matrix which represents this objects position in screen space
|
|
CalculateOpacity ( ) : void |
When the opacity changes this method is used to calculate the blend colour.
|
|
ManualTextureMask ( Microsoft.Xna.Framework.Graphics.Texture2D &Texture, Color ColorFrom ) : void |
Manually replaces a specified color in a texture with transparent black, thereby masking it.
|
public AddUpdateHook ( UpdateHookDelegate hook ) : void | ||
hook | UpdateHookDelegate | |
return | void |
public abstract Draw ( FSO.Client.UI.Framework.UISpriteBatch batch ) : void | ||
batch | FSO.Client.UI.Framework.UISpriteBatch | |
return | void |
public DrawLocalString ( |
||
batch | The SpriteBatch to draw the text onto | |
text | string | The content of the text |
to | Vector2 | The position of the text. Relative to this UIElement. |
style | The text style | |
return | void |
public DrawLocalString ( |
||
batch | The SpriteBatch to draw the text onto | |
text | string | The content of the text |
to | Vector2 | The position of the text. Relative to this UIElement. |
style | The text style | |
bounds | Rectangle relative to this UIElement which the text should be positioned within | |
align | TextAlignment | Alignment of the text within the bounds box. |
return | void |
public DrawLocalString ( |
||
batch | The SpriteBatch to draw the text onto | |
text | string | The content of the text |
to | Vector2 | The position of the text. Relative to this UIElement. |
style | The text style | |
bounds | Rectangle relative to this UIElement which the text should be positioned within | |
align | TextAlignment | Alignment of the text within the bounds box. |
margin | Margin offset from the bounding box. | |
return | void |
public DrawLocalString ( |
||
batch | The SpriteBatch to draw the text onto | |
text | string | The content of the text |
to | Vector2 | The position of the text. Relative to this UIElement. |
style | The text style | |
bounds | Rectangle relative to this UIElement which the text should be positioned within | |
align | TextAlignment | Alignment of the text within the bounds box. |
margin | Margin offset from the bounding box. | |
state | UIElementState | State of the text, e.g. hover, down, normal |
return | void |
public DrawLocalTexture ( |
||
batch | ||
texture | Microsoft.Xna.Framework.Graphics.Texture2D | |
from | Nullable |
|
to | Vector2 | |
scale | Vector2 | |
return | void |
public DrawLocalTexture ( |
||
batch | ||
texture | Microsoft.Xna.Framework.Graphics.Texture2D | |
from | Nullable |
|
to | Vector2 | |
scale | Vector2 | |
blend | Color | |
return | void |
public DrawLocalTexture ( |
||
batch | ||
texture | Microsoft.Xna.Framework.Graphics.Texture2D | |
from | ||
to | Vector2 | |
return | void |
public DrawLocalTexture ( |
||
batch | ||
texture | Microsoft.Xna.Framework.Graphics.Texture2D | |
to | Vector2 | |
return | void |
public DrawTiledTexture ( |
||
batch | ||
texture | Microsoft.Xna.Framework.Graphics.Texture2D | |
dest | ||
blend | Color | |
return | void |
public FlooredLocalPoint ( Vector2 point ) : Vector2 | ||
point | Vector2 | |
return | Vector2 |
public GetMousePosition ( Microsoft.Xna.Framework.Input.MouseState mouse ) : Vector2 | ||
mouse | Microsoft.Xna.Framework.Input.MouseState | |
return | Vector2 |
public static GetTexture ( |
||
id | ||
return | Microsoft.Xna.Framework.Graphics.Texture2D |
public static GetTexture ( ulong id ) : Microsoft.Xna.Framework.Graphics.Texture2D | ||
id | ulong | |
return | Microsoft.Xna.Framework.Graphics.Texture2D |
public GlobalPoint ( Vector2 globalPoint ) : Vector2 | ||
globalPoint | Vector2 | |
return | Vector2 |
public HitTestArea ( UpdateState state, |
||
state | FSO.Common.Rendering.Framework.Model.UpdateState | |
area | ||
cache | bool | |
return | bool |
public ListenForMouse ( |
||
region | ||
callback | UIMouseEvent | |
return |
public LocalPoint ( Vector2 point ) : Vector2 | ||
point | Vector2 | |
return | Vector2 |
public LocalPoint ( float x, float y ) : Vector2 | ||
x | float | |
y | float | |
return | Vector2 |
public LocalRect ( float x, float y, float w, float h ) : |
||
x | float | |
y | float | |
w | float | |
h | float | |
return |
public LocalRect ( float x, float y, float w, float h, float mtx ) : |
||
x | float | |
y | float | |
w | float | |
h | float | |
mtx | float | |
return |
protected ManualTextureMask ( Microsoft.Xna.Framework.Graphics.Texture2D &Texture, Color ColorFrom ) : void | ||
Texture | Microsoft.Xna.Framework.Graphics.Texture2D | The texture on which to apply the mask. |
ColorFrom | Color | The color to mask away. |
return | void |
public PreDraw ( FSO.Client.UI.Framework.UISpriteBatch batch ) : void | ||
batch | FSO.Client.UI.Framework.UISpriteBatch | |
return | void |
public RemoveMouseListener ( |
||
item | ||
return | void |
public RemoveUpdateHook ( UpdateHookDelegate hook ) : void | ||
hook | UpdateHookDelegate | |
return | void |
public static StoreTexture ( ulong id, |
||
id | ulong | |
assetData | ||
return | Microsoft.Xna.Framework.Graphics.Texture2D |
public static StoreTexture ( ulong id, |
||
id | ulong | |
assetData | ||
mask | bool | |
cacheOnDisk | bool | |
return | Microsoft.Xna.Framework.Graphics.Texture2D |
public Update ( UpdateState state ) : void | ||
state | FSO.Common.Rendering.Framework.Model.UpdateState | |
return | void |