Class Button
Inherited Members
System.Object.ToString()
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()
Namespace: Inferno.UI.Controls
Assembly: Inferno.Desktop.dll
Syntax
public class Button : Control
Constructors
| Improve this Doc View SourceButton(Vector2, String, Font, Color, Color, Color, Int32, Sprite, Boolean)
Create a new Button
Declaration
public Button(Vector2 position, string text, Font font, Color textColor, Color backgroundColor, Color borderColor, int borderWidth = 1, Sprite backgroundImage = null, bool highlightOnHover = true)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | position | |
| System.String | text | |
| Font | font | |
| Color | textColor | |
| Color | backgroundColor | |
| Color | borderColor | |
| System.Int32 | borderWidth | |
| Sprite | backgroundImage | |
| System.Boolean | highlightOnHover |
Button(Vector2, String, Font, Color, Boolean)
Create a new Button without a background or border
Declaration
public Button(Vector2 position, string text, Font font, Color textColor, bool highlightOnHover = true)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | position | |
| System.String | text | |
| Font | font | |
| Color | textColor | |
| System.Boolean | highlightOnHover |
Button(Vector2, String, Font, Boolean)
Create a new Button without a background or border and with a default font color of black
Declaration
public Button(Vector2 position, string text, Font font, bool highlightOnHover = true)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | position | |
| System.String | text | |
| Font | font | |
| System.Boolean | highlightOnHover |