Table of Contents

Namespace MLEM.Ui.Elements

Classes

Button

A button element for use inside of a UiSystem. A button element can be pressed, hovered over and that can be disabled.

Checkbox

A checkbox element to use inside of a UiSystem. A checkbox can be checked by pressing it and will stay checked until it is pressed again. For a checkbox that causes neighboring checkboxes to be deselected automatically, use RadioButton.

Dropdown

A dropdown component to use inside of a UiSystem. A dropdown is a component that contains a hidden panel which is displayed upon pressing the dropdown button.

Element

This class represents a generic base class for ui elements of a UiSystem.

ElementExtensions

This class contains a set of extensions for dealing with Element objects

ElementHelper

This class contains a set of helper methods that aid in creating special kinds of compound Element types for use inside of a UiSystem.

Group

A group element to be used inside of a UiSystem. A group is an element that has no rendering or interaction on its own, but that can aid with automatic placement of child elements.

Image

An image element to be used inside of a UiSystem. An image is simply an element that displays a supplied TextureRegion and optionally allows for the texture region to remain at its original aspect ratio, regardless of the element's size.

Panel

A panel element to be used inside of a UiSystem. The panel is a complex element that displays a box as a background to all of its child elements. Additionally, a panel can be set to scroll overflowing elements on construction, which causes all elements that don't fit into the panel to be hidden until scrolled to using a ScrollBar.

Paragraph

A paragraph element for use inside of a UiSystem. A paragraph is an element that contains text. A paragraph's text can be formatted using the ui system's TextFormatter.

Paragraph.Link

A link is a sub-element of the Paragraph that is added onto it as a child for any tokens that contain LinkCode, to make them selectable and clickable.

ProgressBar

A progress bar element to use inside of a UiSystem. A progress bar is an element that fills up a bar based on a given CurrentValue percentage.

RadioButton

A radio button element to use inside of a UiSystem. A radio button is a variation of a Checkbox that causes all other radio buttons in the same RootElement to be deselected upon selection.

ScrollBar

A scroll bar element to be used inside of a UiSystem. A scroll bar is an element that features a smaller scroller indicator inside of it that can move up and down. A scroll bar can be scrolled using the mouse or by using the scroll wheel while hovering over its Parent or any of its siblings.

Slider

A slider element for use inside of a UiSystem. A slider is a horizontal ScrollBar whose value can additionally be controlled using the LeftButtons and RightButtons.

SpriteAnimationImage

A sprite animation image for use inside of a UiSystem. A sprite animation image is an Image that displays a SpriteAnimation or SpriteAnimationGroup.

SquishingGroup

A squishing group is a Group whose Children automatically get resized so that they do not overlap each other. Elements are squished in a way that maximizes the final area that each element retains compared to its original area. The order in which elements are squished depends on their Priority, where elements with a lower priority will move out of the way of elements with a higher priority. If all elements have the same priority, their addition order (their order in Children) determines squish order.

TextField

A text field element for use inside of a UiSystem. A text field is a selectable element that can be typed in, as well as copied and pasted from. If an on-screen keyboard is required, then this text field will automatically open an on-screen keyboard using OpenOnScreenKeyboard(string, string, string, bool). This class interally uses MLEM's TextInput.

Tooltip

A tooltip element for use inside of a UiSystem. A tooltip is a Panel with a custom cursor that always follows the position of the mouse. Tooltips can easily be configured to be hooked onto an element, causing them to appear when it is moused, and disappear when it is not moused anymore.

VerticalSpace

A vertical space element for use inside of a UiSystem. A vertical space is an invisible element that can be used to add vertical space between paragraphs or other elements.

Delegates

Checkbox.CheckStateChange

A delegate used for OnCheckStateChange

Element.BeginDelegate

A delegate method used for BeginImpl

Element.DrawCallback

A delegate used inside of Draw(GameTime, SpriteBatch, float, SpriteBatchContext)

Element.GamepadNextElementCallback

A delegate used by GetGamepadNextElement.

Element.GenericCallback

A generic element-specific delegate.

Element.OtherElementCallback

A generic element-specific delegate that includes a second element.

Element.TabNextElementCallback

A delegate used by GetTabNextElement.

Element.TextInputCallback

A delegate used for the OnTextInput event.

Element.TimeCallback

A generic delegate used inside of Update(GameTime)

Image.TextureCallback

A delegate method used for GetTextureCallback

Paragraph.TextCallback

A delegate method used for GetTextCallback

ScrollBar.ValueChanged

A delegate method used for OnValueChanged

TextField.Rule

A delegate method used for InputRule. It should return whether the given text can be added to the text field.

TextField.TextChanged

A delegate method used for OnTextChange