A container for UIElements used within a UIView. Used to divide the View into smaller segments and to move around a group of elements easily
More...
|
| Layout (UIView parentView, int rows, int cols) |
| Initializes a new instance of the T:MB2D.UI.Layout class. Divides the layouts rows and columns into an even cell size based of its parents size. More...
|
|
override void | Update () |
| Update all elements contained within the layout. More...
|
|
override void | Draw (SpriteBatch spriteBatch) |
| Draws all elements contained within the layout and the layouts border to the window. More...
|
|
void | Add (UIElement element, int atRow, int atCol, int rowSpan, int colSpan) |
| Adds a new UIElement to the layout, setting its size relative to this layouts cell size More...
|
|
void | SetRelativeSize (UIContent parent, Point at, Point span) |
| Sets the size of the element relative to its parent More...
|
|
void | SetRelativeSize (UIContent parent, int atRow, int atCol, int rowSpan, int colSpan) |
| Sets the size of the element relative to its parent More...
|
|
|
Texture2D | BaseTexture [get, set] |
|
UIContent | Content [get] |
| Gets the UIContent of the element, only available in container elements More...
|
|
Vector2 | Size [get] |
| Gets the column and row count of the element More...
|
|
Rectangle | BoundingBox [get] |
| Gets the bounding box of this element More...
|
|
bool | Fill [get, set] |
| Gets or sets a value that indicates the element should be stretched or shrunk to fill its parents bounds exactly More...
|
|
Color | BackgroundColor [get, set] |
| Gets or sets the color of the elements background. More...
|
|
string | TextContent [get, set] |
| Gets or sets the string rendered by the element. More...
|
|
Color | TextColor [get, set] |
| Gets or sets the current color of the text. More...
|
|
SpriteFont | Font [get, set] |
| Gets or sets the font used in rendering the elements TextContent More...
|
|
bool | BorderDisplayed [get, set] |
| Gets or sets a value indicating whether this T:MB2D.UI.UIElement has itsborder displayed. More...
|
|
int | BorderWidth [get, set] |
| Gets or sets the width of the border. More...
|
|
Color | BorderColor [get, set] |
| Gets or sets the color of the border. More...
|
|
Color | BorderTopColor [get, set] |
| Gets or sets the color of the border top. More...
|
|
Color | BorderRightColor [get, set] |
| Gets or sets the color of the border right. More...
|
|
Color | BorderBottomColor [get, set] |
| Gets or sets the color of the border bottom. More...
|
|
Color | BorderLeftColor [get, set] |
| Gets or sets the color of the border left. More...
|
|
string | Tag [get, set] |
| Gets or sets the tag used to quickly access this element and uniquely identify it. More...
|
|
|
| UIElement (int rows, int cols) |
| Initializes a new instance of the T:MB2D.UI.UIElement class. Sets default property values More...
|
|
void | DrawBorder (SpriteBatch spriteBatch) |
| Draws the elements border to the window. Skips sides that have color set to Color.Transparent More...
|
|
A container for UIElements used within a UIView. Used to divide the View into smaller segments and to move around a group of elements easily
§ Layout()
MB2D.UI.Layout.Layout |
( |
UIView |
parentView, |
|
|
int |
rows, |
|
|
int |
cols |
|
) |
| |
|
inline |
Initializes a new instance of the T:MB2D.UI.Layout class. Divides the layouts rows and columns into an even cell size based of its parents size.
- Parameters
-
rows | Number of rows the layout has. |
cols | Number of columns the layout has. |
§ Add()
void MB2D.UI.Layout.Add |
( |
UIElement |
element, |
|
|
int |
atRow, |
|
|
int |
atCol, |
|
|
int |
rowSpan, |
|
|
int |
colSpan |
|
) |
| |
|
inline |
Adds a new UIElement to the layout, setting its size relative to this layouts cell size
- Parameters
-
element | Element to add. |
atRow | Row position to add the element at. |
atCol | Column position to add the element at. |
rowSpan | Number of rows the element should span. |
colSpan | Number of columns the element should span. |
§ Draw()
override void MB2D.UI.Layout.Draw |
( |
SpriteBatch |
spriteBatch | ) |
|
|
inlinevirtual |
Draws all elements contained within the layout and the layouts border to the window.
- Parameters
-
spriteBatch | Sprite batch to draw to. |
Reimplemented from MB2D.UI.UIElement.
§ Update()
override void MB2D.UI.Layout.Update |
( |
| ) |
|
|
inlinevirtual |
The documentation for this class was generated from the following file: