public class Editor.Button : Editor.Widget
A simple button widget.
Related Guides
Broader workflow and conceptual references connected to this API.
When creating your own Classes/Structs/Assets/ect, you'll sometimes want custom editors that pair with them. For example, a Gradient Editor so you can visually see what the Gradient looks like instead of editing the Gradient as if it were a Struct with a list of Colours.
You can create your own editor tool to help you create your game. Your tool needs to be created in an editor project.
Editor UI is built entirely out of Widgets. Widgets are different from Panels, which are used for in-game UI. Widgets can be various elements or components, such as labels, buttons, text boxes, trees, or images.
You can broadcast and listen to events in your scene using interfaces.
Input is accessed using the… Input class!
Razor Component allow you to define some content to show inside another razor file. This makes it easy to create Panels that are more agile and reusable.
Constructors
Showing 3 constructors
No results match this filter.
Methods
Showing 7 methods
public Editor.Pixmap GetIcon()
protected virtual void OnClicked()
protected virtual void OnPaint()
protected virtual void OnPressed()
protected virtual void OnReleased()
protected virtual void OnToggled()
public void SetIcon(Editor.Pixmap pixmap)
Sets an icon for the button via a raw image.
No results match this filter.
Properties
Showing 5 properties
public string Editor.Button.Icon { get; set; }
Sets an icon for the button via a filepath.
public bool Editor.Button.IsChecked { get; set; }
Whether this button is checked. See `Editor.Button.IsToggle`.
public bool Editor.Button.IsToggle { get; set; }
Whether this button can be toggled on or off. See `Editor.Button.IsChecked`.
public string Editor.Button.Text { get; set; }
Text on the button.
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | Editor |
| Type | class |
| Assembly | Sandbox.Tools |
| Doc ID | T:Editor.Button |