ToolButtonclass

A button that shows as an icon and tries to keep itself square.

objectWidgetToolButton
Namespace
Editor
Assembly
Sandbox.Tools
Declaration
public class Editor.ToolButton : Editor.Widget

Constructors1

Showing 1 constructors

public ToolButton(string name, string icon, Editor.Widget parent)PUBLICCONSTRUCTOR

ParameterTypeDescription
namestring
iconstring
parentWidget

Methods3

Showing 3 methods

protected virtual void DoLayout()PROTECTEDVIRTUAL

Returns:void

protected virtual void OnMousePress(Editor.MouseEvent e)PROTECTEDVIRTUAL

ParameterTypeDescription
eMouseEvent
Returns:void

protected virtual void OnPaint()PROTECTEDVIRTUAL

Returns:void

Properties4

Showing 4 properties

public bool Editor.ToolButton.Checked { get; set; }PUBLICGETSET

Whether the tool button is currently checked or not.

Returns:bool

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

Icon for the tool button.

Returns:string

public string Editor.ToolButton.IconChecked { get; set; }PUBLICGETSET

Icon to display when the `Editor.ToolButton.Checked` is .

Returns:string

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

Whether the button is toggle-able or not.

Returns:bool

On this page