Buttonclass

A simple button widget.

objectWidgetButton
Namespace
Editor
Assembly
Sandbox.Tools
Declaration
public class Editor.Button : Editor.Widget

Constructors3

Showing 3 constructors

Methods7

Showing 7 methods

protected virtual void OnClicked()PROTECTEDVIRTUAL

Returns:void

protected virtual void OnPaint()PROTECTEDVIRTUAL

Returns:void

protected virtual void OnPressed()PROTECTEDVIRTUAL

Returns:void

protected virtual void OnReleased()PROTECTEDVIRTUAL

Returns:void

protected virtual void OnToggled()PROTECTEDVIRTUAL

Returns:void

public void SetIcon(Editor.Pixmap pixmap)PUBLIC

Sets an icon for the button via a raw image.

ParameterTypeDescription
pixmapPixmap
Returns:void

Properties5

Showing 5 properties

public string Editor.Button.Icon { get; set; }PUBLICGETSET

Sets an icon for the button via a filepath.

Returns:string

public bool Editor.Button.IsChecked { get; set; }PUBLICGETSET

Whether this button is checked. See `Editor.Button.IsToggle`.

Returns:bool

public bool Editor.Button.IsToggle { get; set; }PUBLICGETSET

Whether this button can be toggled on or off. See `Editor.Button.IsChecked`.

Returns:bool

public string Editor.Button.Text { get; set; }PUBLICGETSET

Text on the button.

Returns:string

public Color Editor.Button.Tint { get; set; }PUBLICGETSET

The tint of the button color

Returns:Color

On this page