### YamlMime:ManagedReference
items:
- uid: MLEM.Ui.Elements.Button
commentId: T:MLEM.Ui.Elements.Button
id: Button
parent: MLEM.Ui.Elements
children:
- MLEM.Ui.Elements.Button.#ctor(MLEM.Ui.Anchor,Microsoft.Xna.Framework.Vector2)
- MLEM.Ui.Elements.Button.#ctor(MLEM.Ui.Anchor,Microsoft.Xna.Framework.Vector2,MLEM.Ui.Elements.Paragraph.TextCallback,MLEM.Ui.Elements.Paragraph.TextCallback)
- MLEM.Ui.Elements.Button.#ctor(MLEM.Ui.Anchor,Microsoft.Xna.Framework.Vector2,System.String,System.String)
- MLEM.Ui.Elements.Button.AutoDisableCondition
- MLEM.Ui.Elements.Button.CanBePressed
- MLEM.Ui.Elements.Button.CanBeSelected
- MLEM.Ui.Elements.Button.CanSelectDisabled
- MLEM.Ui.Elements.Button.DisabledColor
- MLEM.Ui.Elements.Button.DisabledTexture
- MLEM.Ui.Elements.Button.Draw(Microsoft.Xna.Framework.GameTime,Microsoft.Xna.Framework.Graphics.SpriteBatch,System.Single,MLEM.Graphics.SpriteBatchContext)
- MLEM.Ui.Elements.Button.HoveredColor
- MLEM.Ui.Elements.Button.HoveredTexture
- MLEM.Ui.Elements.Button.InitStyle(MLEM.Ui.Style.UiStyle)
- MLEM.Ui.Elements.Button.IsDisabled
- MLEM.Ui.Elements.Button.NormalColor
- MLEM.Ui.Elements.Button.Text
- MLEM.Ui.Elements.Button.Texture
- MLEM.Ui.Elements.Button.Tooltip
- MLEM.Ui.Elements.Button.TruncateTextIfLong
langs:
- csharp
- vb
name: Button
nameWithType: Button
fullName: MLEM.Ui.Elements.Button
type: Class
source:
remote:
path: MLEM.Ui/Elements/Button.cs
branch: main
repo: https://github.com/Ellpeck/MLEM
id: Button
path: ../MLEM.Ui/Elements/Button.cs
startLine: 13
assemblies:
- MLEM.Ui
namespace: MLEM.Ui.Elements
summary: >-
A button element for use inside of a .
A button element can be pressed, hovered over and that can be disabled.
example: []
syntax:
content: 'public class Button : Element, IGenericDataHolder'
content.vb: Public Class Button Inherits Element Implements IGenericDataHolder
inheritance:
- System.Object
- MLEM.Misc.GenericDataHolder
- MLEM.Ui.Elements.Element
derivedClasses:
- MLEM.Ui.Elements.Dropdown
implements:
- MLEM.Misc.IGenericDataHolder
inheritedMembers:
- MLEM.Ui.Elements.Element.Epsilon
- MLEM.Ui.Elements.Element.System
- MLEM.Ui.Elements.Element.Controls
- MLEM.Ui.Elements.Element.Parent
- MLEM.Ui.Elements.Element.Root
- MLEM.Ui.Elements.Element.Scale
- MLEM.Ui.Elements.Element.Anchor
- MLEM.Ui.Elements.Element.Size
- MLEM.Ui.Elements.Element.ScaledSize
- MLEM.Ui.Elements.Element.AutoSizeAddedAbsolute
- MLEM.Ui.Elements.Element.ScaledAutoSizeAddedAbsolute
- MLEM.Ui.Elements.Element.PositionOffset
- MLEM.Ui.Elements.Element.ScaledOffset
- MLEM.Ui.Elements.Element.ScaledPadding
- MLEM.Ui.Elements.Element.ScaledChildPadding
- MLEM.Ui.Elements.Element.ChildPaddedArea
- MLEM.Ui.Elements.Element.UnscrolledArea
- MLEM.Ui.Elements.Element.Area
- MLEM.Ui.Elements.Element.DisplayArea
- MLEM.Ui.Elements.Element.ScrollOffset
- MLEM.Ui.Elements.Element.ScaledScrollOffset
- MLEM.Ui.Elements.Element.IsHidden
- MLEM.Ui.Elements.Element.Priority
- MLEM.Ui.Elements.Element.Transform
- MLEM.Ui.Elements.Element.CanBeMoused
- MLEM.Ui.Elements.Element.CanAutoAnchorsAttach
- MLEM.Ui.Elements.Element.SetWidthBasedOnChildren
- MLEM.Ui.Elements.Element.SetHeightBasedOnChildren
- MLEM.Ui.Elements.Element.TreatSizeAsMinimum
- MLEM.Ui.Elements.Element.TreatSizeAsMaximum
- MLEM.Ui.Elements.Element.PreventParentSpill
- MLEM.Ui.Elements.Element.DrawAlpha
- MLEM.Ui.Elements.Element.IsMouseOver
- MLEM.Ui.Elements.Element.IsSelected
- MLEM.Ui.Elements.Element.IsSelectedActive
- MLEM.Ui.Elements.Element.AreaDirty
- MLEM.Ui.Elements.Element.AutoNavGroup
- MLEM.Ui.Elements.Element.Style
- MLEM.Ui.Elements.Element.SelectionIndicator
- MLEM.Ui.Elements.Element.ActionSound
- MLEM.Ui.Elements.Element.SecondActionSound
- MLEM.Ui.Elements.Element.Padding
- MLEM.Ui.Elements.Element.ChildPadding
- MLEM.Ui.Elements.Element.MouseEnterAnimation
- MLEM.Ui.Elements.Element.MouseExitAnimation
- MLEM.Ui.Elements.Element.OnDrawn
- MLEM.Ui.Elements.Element.OnUpdated
- MLEM.Ui.Elements.Element.OnPressed
- MLEM.Ui.Elements.Element.OnSecondaryPressed
- MLEM.Ui.Elements.Element.OnSelected
- MLEM.Ui.Elements.Element.OnDeselected
- MLEM.Ui.Elements.Element.OnMouseEnter
- MLEM.Ui.Elements.Element.OnMouseExit
- MLEM.Ui.Elements.Element.OnTouchEnter
- MLEM.Ui.Elements.Element.OnTouchExit
- MLEM.Ui.Elements.Element.OnTextInput
- MLEM.Ui.Elements.Element.OnAreaUpdated
- MLEM.Ui.Elements.Element.OnStyleInit
- MLEM.Ui.Elements.Element.OnMousedElementChanged
- MLEM.Ui.Elements.Element.OnTouchedElementChanged
- MLEM.Ui.Elements.Element.OnSelectedElementChanged
- MLEM.Ui.Elements.Element.GetTabNextElement
- MLEM.Ui.Elements.Element.GetGamepadNextElement
- MLEM.Ui.Elements.Element.OnChildAdded
- MLEM.Ui.Elements.Element.OnChildRemoved
- MLEM.Ui.Elements.Element.OnAddedToUi
- MLEM.Ui.Elements.Element.OnRemovedFromUi
- MLEM.Ui.Elements.Element.Children
- MLEM.Ui.Elements.Element.PlayingAnimations
- MLEM.Ui.Elements.Element.SortedChildren
- MLEM.Ui.Elements.Element.Input
- MLEM.Ui.Elements.Element.ParentArea
- MLEM.Ui.Elements.Element.AddChild``1({T},System.Int32)
- MLEM.Ui.Elements.Element.RemoveChild(MLEM.Ui.Elements.Element)
- MLEM.Ui.Elements.Element.RemoveChildren(System.Func{MLEM.Ui.Elements.Element,System.Boolean})
- MLEM.Ui.Elements.Element.SetSortedChildrenDirty
- MLEM.Ui.Elements.Element.UpdateSortedChildrenIfDirty
- MLEM.Ui.Elements.Element.ForceUpdateSortedChildren
- MLEM.Ui.Elements.Element.SetAreaDirty
- MLEM.Ui.Elements.Element.UpdateAreaIfDirty
- MLEM.Ui.Elements.Element.ForceUpdateArea
- MLEM.Ui.Elements.Element.SetAreaAndUpdateChildren(MLEM.Maths.RectangleF)
- MLEM.Ui.Elements.Element.CalcActualSize(MLEM.Maths.RectangleF)
- MLEM.Ui.Elements.Element.GetAreaForAutoAnchors
- MLEM.Ui.Elements.Element.GetLowestChild(System.Func{MLEM.Ui.Elements.Element,System.Boolean},System.Boolean)
- MLEM.Ui.Elements.Element.GetRightmostChild(System.Func{MLEM.Ui.Elements.Element,System.Boolean},System.Boolean)
- MLEM.Ui.Elements.Element.GetLowestOlderSibling(System.Func{MLEM.Ui.Elements.Element,System.Boolean},System.Boolean)
- MLEM.Ui.Elements.Element.GetOlderSibling(System.Func{MLEM.Ui.Elements.Element,System.Boolean})
- MLEM.Ui.Elements.Element.GetSiblings(System.Func{MLEM.Ui.Elements.Element,System.Boolean})
- MLEM.Ui.Elements.Element.GetChildren``1(System.Func{{T},System.Boolean},System.Boolean,System.Boolean)
- MLEM.Ui.Elements.Element.GetChildren(System.Func{MLEM.Ui.Elements.Element,System.Boolean},System.Boolean,System.Boolean)
- MLEM.Ui.Elements.Element.GetParentTree
- MLEM.Ui.Elements.Element.GetTotalCoveredArea(System.Boolean)
- MLEM.Ui.Elements.Element.GetRelevantChildren
- MLEM.Ui.Elements.Element.Update(Microsoft.Xna.Framework.GameTime)
- MLEM.Ui.Elements.Element.DrawTransformed(Microsoft.Xna.Framework.GameTime,Microsoft.Xna.Framework.Graphics.SpriteBatch,System.Single,MLEM.Graphics.SpriteBatchContext)
- MLEM.Ui.Elements.Element.GetElementUnderPos(Microsoft.Xna.Framework.Vector2)
- MLEM.Ui.Elements.Element.PlayAnimation(MLEM.Ui.UiAnimation)
- MLEM.Ui.Elements.Element.StopAnimation(MLEM.Ui.UiAnimation)
- MLEM.Ui.Elements.Element.ToString
- MLEM.Ui.Elements.Element.AndChildren(System.Action{MLEM.Ui.Elements.Element})
- MLEM.Ui.Elements.Element.ReorderChildren(System.Comparison{MLEM.Ui.Elements.Element})
- MLEM.Ui.Elements.Element.ReverseChildren(System.Int32,System.Nullable{System.Int32})
- MLEM.Ui.Elements.Element.ScaleTransform(System.Single,System.Nullable{Microsoft.Xna.Framework.Vector2})
- MLEM.Ui.Elements.Element.OnChildAreaDirty(MLEM.Ui.Elements.Element,System.Boolean)
- MLEM.Ui.Elements.Element.TransformInverse(Microsoft.Xna.Framework.Vector2)
- MLEM.Ui.Elements.Element.TransformInverseAll(Microsoft.Xna.Framework.Vector2)
- MLEM.Ui.Elements.Element.AddedToUi(MLEM.Ui.UiSystem,MLEM.Ui.RootElement)
- MLEM.Ui.Elements.Element.RemovedFromUi
- MLEM.Misc.GenericDataHolder.SetData``1(System.String,{T})
- MLEM.Misc.GenericDataHolder.GetData``1(System.String)
- MLEM.Misc.GenericDataHolder.GetDataKeys
- System.Object.Equals(System.Object)
- System.Object.Equals(System.Object,System.Object)
- System.Object.ReferenceEquals(System.Object,System.Object)
- System.Object.GetHashCode
- System.Object.GetType
- System.Object.MemberwiseClone
extensionMethods:
- MLEM.Ui.Elements.Element.MLEM.Ui.Elements.ElementExtensions.AddTooltip(MLEM.Ui.Elements.Paragraph.TextCallback)
- MLEM.Ui.Elements.Element.MLEM.Ui.Elements.ElementExtensions.AddTooltip(MLEM.Ui.Elements.Tooltip)
- MLEM.Ui.Elements.Element.MLEM.Ui.Elements.ElementExtensions.AddTooltip(System.String)
- uid: MLEM.Ui.Elements.Button.Texture
commentId: F:MLEM.Ui.Elements.Button.Texture
id: Texture
parent: MLEM.Ui.Elements.Button
langs:
- csharp
- vb
name: Texture
nameWithType: Button.Texture
fullName: MLEM.Ui.Elements.Button.Texture
type: Field
source:
remote:
path: MLEM.Ui/Elements/Button.cs
branch: main
repo: https://github.com/Ellpeck/MLEM
id: Texture
path: ../MLEM.Ui/Elements/Button.cs
startLine: 18
assemblies:
- MLEM.Ui
namespace: MLEM.Ui.Elements
summary: The button's texture
example: []
syntax:
content: public StyleProp Texture
return:
type: MLEM.Ui.Style.StyleProp{MLEM.Textures.NinePatch}
content.vb: Public Texture As StyleProp(Of NinePatch)
- uid: MLEM.Ui.Elements.Button.NormalColor
commentId: F:MLEM.Ui.Elements.Button.NormalColor
id: NormalColor
parent: MLEM.Ui.Elements.Button
langs:
- csharp
- vb
name: NormalColor
nameWithType: Button.NormalColor
fullName: MLEM.Ui.Elements.Button.NormalColor
type: Field
source:
remote:
path: MLEM.Ui/Elements/Button.cs
branch: main
repo: https://github.com/Ellpeck/MLEM
id: NormalColor
path: ../MLEM.Ui/Elements/Button.cs
startLine: 22
assemblies:
- MLEM.Ui
namespace: MLEM.Ui.Elements
summary: The color that the button draws its texture with
example: []
syntax:
content: public StyleProp NormalColor
return:
type: MLEM.Ui.Style.StyleProp{Microsoft.Xna.Framework.Color}
content.vb: Public NormalColor As StyleProp(Of Color)
- uid: MLEM.Ui.Elements.Button.HoveredTexture
commentId: F:MLEM.Ui.Elements.Button.HoveredTexture
id: HoveredTexture
parent: MLEM.Ui.Elements.Button
langs:
- csharp
- vb
name: HoveredTexture
nameWithType: Button.HoveredTexture
fullName: MLEM.Ui.Elements.Button.HoveredTexture
type: Field
source:
remote:
path: MLEM.Ui/Elements/Button.cs
branch: main
repo: https://github.com/Ellpeck/MLEM
id: HoveredTexture
path: ../MLEM.Ui/Elements/Button.cs
startLine: 27
assemblies:
- MLEM.Ui
namespace: MLEM.Ui.Elements
summary: >-
The texture that the button uses while being moused over.
If this is null, it uses its default .
example: []
syntax:
content: public StyleProp HoveredTexture
return:
type: MLEM.Ui.Style.StyleProp{MLEM.Textures.NinePatch}
content.vb: Public HoveredTexture As StyleProp(Of NinePatch)
- uid: MLEM.Ui.Elements.Button.HoveredColor
commentId: F:MLEM.Ui.Elements.Button.HoveredColor
id: HoveredColor
parent: MLEM.Ui.Elements.Button
langs:
- csharp
- vb
name: HoveredColor
nameWithType: Button.HoveredColor
fullName: MLEM.Ui.Elements.Button.HoveredColor
type: Field
source:
remote:
path: MLEM.Ui/Elements/Button.cs
branch: main
repo: https://github.com/Ellpeck/MLEM
id: HoveredColor
path: ../MLEM.Ui/Elements/Button.cs
startLine: 31
assemblies:
- MLEM.Ui
namespace: MLEM.Ui.Elements
summary: The color that the button uses for drawing while being moused over
example: []
syntax:
content: public StyleProp HoveredColor
return:
type: MLEM.Ui.Style.StyleProp{Microsoft.Xna.Framework.Color}
content.vb: Public HoveredColor As StyleProp(Of Color)
- uid: MLEM.Ui.Elements.Button.DisabledTexture
commentId: F:MLEM.Ui.Elements.Button.DisabledTexture
id: DisabledTexture
parent: MLEM.Ui.Elements.Button
langs:
- csharp
- vb
name: DisabledTexture
nameWithType: Button.DisabledTexture
fullName: MLEM.Ui.Elements.Button.DisabledTexture
type: Field
source:
remote:
path: MLEM.Ui/Elements/Button.cs
branch: main
repo: https://github.com/Ellpeck/MLEM
id: DisabledTexture
path: ../MLEM.Ui/Elements/Button.cs
startLine: 36
assemblies:
- MLEM.Ui
namespace: MLEM.Ui.Elements
summary: >-
The texture that the button uses when it .
If this is null, it uses its default .
example: []
syntax:
content: public StyleProp DisabledTexture
return:
type: MLEM.Ui.Style.StyleProp{MLEM.Textures.NinePatch}
content.vb: Public DisabledTexture As StyleProp(Of NinePatch)
- uid: MLEM.Ui.Elements.Button.DisabledColor
commentId: F:MLEM.Ui.Elements.Button.DisabledColor
id: DisabledColor
parent: MLEM.Ui.Elements.Button
langs:
- csharp
- vb
name: DisabledColor
nameWithType: Button.DisabledColor
fullName: MLEM.Ui.Elements.Button.DisabledColor
type: Field
source:
remote:
path: MLEM.Ui/Elements/Button.cs
branch: main
repo: https://github.com/Ellpeck/MLEM
id: DisabledColor
path: ../MLEM.Ui/Elements/Button.cs
startLine: 40
assemblies:
- MLEM.Ui
namespace: MLEM.Ui.Elements
summary: The color that the button uses for drawing when it
example: []
syntax:
content: public StyleProp DisabledColor
return:
type: MLEM.Ui.Style.StyleProp{Microsoft.Xna.Framework.Color}
content.vb: Public DisabledColor As StyleProp(Of Color)
- uid: MLEM.Ui.Elements.Button.Text
commentId: F:MLEM.Ui.Elements.Button.Text
id: Text
parent: MLEM.Ui.Elements.Button
langs:
- csharp
- vb
name: Text
nameWithType: Button.Text
fullName: MLEM.Ui.Elements.Button.Text
type: Field
source:
remote:
path: MLEM.Ui/Elements/Button.cs
branch: main
repo: https://github.com/Ellpeck/MLEM
id: Text
path: ../MLEM.Ui/Elements/Button.cs
startLine: 45
assemblies:
- MLEM.Ui
namespace: MLEM.Ui.Elements
summary: >-
The of text that is displayed on the button.
Note that this is only nonnull by default if the constructor was passed a nonnull text.
example: []
syntax:
content: public Paragraph Text
return:
type: MLEM.Ui.Elements.Paragraph
content.vb: Public Text As Paragraph
- uid: MLEM.Ui.Elements.Button.Tooltip
commentId: F:MLEM.Ui.Elements.Button.Tooltip
id: Tooltip
parent: MLEM.Ui.Elements.Button
langs:
- csharp
- vb
name: Tooltip
nameWithType: Button.Tooltip
fullName: MLEM.Ui.Elements.Button.Tooltip
type: Field
source:
remote:
path: MLEM.Ui/Elements/Button.cs
branch: main
repo: https://github.com/Ellpeck/MLEM
id: Tooltip
path: ../MLEM.Ui/Elements/Button.cs
startLine: 50
assemblies:
- MLEM.Ui
namespace: MLEM.Ui.Elements
summary: >-
The that is displayed when hovering over the button.
Note that this is only nonnull by default if the constructor was passed a nonnull tooltip text.
example: []
syntax:
content: public Tooltip Tooltip
return:
type: MLEM.Ui.Elements.Tooltip
content.vb: Public Tooltip As Tooltip
- uid: MLEM.Ui.Elements.Button.IsDisabled
commentId: P:MLEM.Ui.Elements.Button.IsDisabled
id: IsDisabled
parent: MLEM.Ui.Elements.Button
langs:
- csharp
- vb
name: IsDisabled
nameWithType: Button.IsDisabled
fullName: MLEM.Ui.Elements.Button.IsDisabled
type: Property
source:
remote:
path: MLEM.Ui/Elements/Button.cs
branch: main
repo: https://github.com/Ellpeck/MLEM
id: IsDisabled
path: ../MLEM.Ui/Elements/Button.cs
startLine: 56
assemblies:
- MLEM.Ui
namespace: MLEM.Ui.Elements
summary: >-
Set this property to true to mark the button as disabled.
A disabled button cannot be moused over, selected or pressed.
If this value changes often, consider using .
example: []
syntax:
content: public virtual bool IsDisabled { get; set; }
parameters: []
return:
type: System.Boolean
content.vb: Public Overridable Property IsDisabled As Boolean
overload: MLEM.Ui.Elements.Button.IsDisabled*
- uid: MLEM.Ui.Elements.Button.TruncateTextIfLong
commentId: P:MLEM.Ui.Elements.Button.TruncateTextIfLong
id: TruncateTextIfLong
parent: MLEM.Ui.Elements.Button
langs:
- csharp
- vb
name: TruncateTextIfLong
nameWithType: Button.TruncateTextIfLong
fullName: MLEM.Ui.Elements.Button.TruncateTextIfLong
type: Property
source:
remote:
path: MLEM.Ui/Elements/Button.cs
branch: main
repo: https://github.com/Ellpeck/MLEM
id: TruncateTextIfLong
path: ../MLEM.Ui/Elements/Button.cs
startLine: 64
assemblies:
- MLEM.Ui
namespace: MLEM.Ui.Elements
summary: >-
Whether this button's should be truncated if it exceeds this button's width.
Defaults to false.
example: []
syntax:
content: public bool TruncateTextIfLong { get; set; }
parameters: []
return:
type: System.Boolean
content.vb: Public Property TruncateTextIfLong As Boolean
overload: MLEM.Ui.Elements.Button.TruncateTextIfLong*
- uid: MLEM.Ui.Elements.Button.CanSelectDisabled
commentId: F:MLEM.Ui.Elements.Button.CanSelectDisabled
id: CanSelectDisabled
parent: MLEM.Ui.Elements.Button
langs:
- csharp
- vb
name: CanSelectDisabled
nameWithType: Button.CanSelectDisabled
fullName: MLEM.Ui.Elements.Button.CanSelectDisabled
type: Field
source:
remote:
path: MLEM.Ui/Elements/Button.cs
branch: main
repo: https://github.com/Ellpeck/MLEM
id: CanSelectDisabled
path: ../MLEM.Ui/Elements/Button.cs
startLine: 75
assemblies:
- MLEM.Ui
namespace: MLEM.Ui.Elements
summary: >-
Whether this button should be able to be selected even if it .
If this is true, will be able to return true even if is true.
example: []
syntax:
content: public bool CanSelectDisabled
return:
type: System.Boolean
content.vb: Public CanSelectDisabled As Boolean
- uid: MLEM.Ui.Elements.Button.AutoDisableCondition
commentId: F:MLEM.Ui.Elements.Button.AutoDisableCondition
id: AutoDisableCondition
parent: MLEM.Ui.Elements.Button
langs:
- csharp
- vb
name: AutoDisableCondition
nameWithType: Button.AutoDisableCondition
fullName: MLEM.Ui.Elements.Button.AutoDisableCondition
type: Field
source:
remote:
path: MLEM.Ui/Elements/Button.cs
branch: main
repo: https://github.com/Ellpeck/MLEM
id: AutoDisableCondition
path: ../MLEM.Ui/Elements/Button.cs
startLine: 80
assemblies:
- MLEM.Ui
namespace: MLEM.Ui.Elements
summary: >-
An optional function that can be used to modify the result of automatically based on a user-defined condition. This removes the need to disable a button based on a condition in or manually.
Note that, if 's underlying value is set to true using , this function's result will be ignored.
example: []
syntax:
content: public Func