ActionButton:
Filter:
Classes (extension) | Libraries > crucial > GUI

ActionButton : SCButtonAdapter : SCViewHolder : Object
ExtensionExtension

a simple button with a name and an action
Subclasses: Tile

Description

Sizes itself to fit the name. Nice, simple constructor saves fiddling around with a raw Button.

SimpleButton in ServerTools is basically the same thing but I wanted that library to have no dependencies on crucial.

Class Methods

ActionButton.new(layout, title, function, minWidth: 20, minHeight, color, backcolor, font)

Arguments:

layout
title
function
minWidth

to overide the auto-sizing feature

minHeight

default is GUI.skin.buttonHeight

color
backcolor
font

Inherited class methods

Instance Methods

.action

.action = f

Arguments:

f

.init(layout, title, function, minWidth: 20, minHeight, color, backcolor, font)

Arguments:

layout
title
function
minWidth
minHeight
color
backcolor
font

Inherited instance methods

Examples