LayerMoveButton

Package: Libraries.Interface.Controls.Scenes.Dialogs · Inherits from: Libraries.Interface.Controls.Button, Libraries.Interface.Controls.Control, Libraries.Interface.Item, Libraries.Interface.Item2D, Libraries.Language.Object, Libraries.Interface.Events.TextureLoadListener

A LayerMoveButton is a small square button with a chevron pointing up or down, which moves a terrain's material layer up or down in the Materials section. It draws a button's face and focus ring like any button, but no text: its name, such as "Move Grass001 up", is for screen readers.

Example Code

use Libraries.Interface.Controls.Scenes.Dialogs.LayerMoveButton

LayerMoveButton button
button:SetUp(true)
button:SetName("Move Grass001 up")

Actions

GainedFocus(Libraries.Interface.Events.FocusEvent event)

Parameters

IsUp()

Returns true if the chevron points up.

Returns

boolean: True for up

LoadGraphics(Libraries.Interface.Layouts.LayoutProperties properties)

Names the button for screen readers. The name isn't drawn.

Parameters

LostFocus(Libraries.Interface.Events.FocusEvent event)

Parameters

SetHeight(number newHeight)

Its own face, so it draws as a button with no text.

Parameters

  • newHeight number

SetName(text name)

Names the button for screen readers. The name isn't drawn.

Parameters

  • name text: The name, such as "Move Grass001 up"

SetSize(number newWidth, number newHeight)

Returns true if the chevron points up.

Parameters

  • newWidth number
  • newHeight number

SetUp(boolean value)

Sets whether the chevron points up or down.

Parameters

  • value boolean: True for up, false for down

SetWidth(number newWidth)

Sets whether the chevron points up or down.

Parameters

  • newWidth number

Inherited Actions

18 actions from Libraries.Interface.Controls.Button
257 actions from Libraries.Interface.Controls.Control
60 actions from Libraries.Interface.Item
198 actions from Libraries.Interface.Item2D
3 actions from Libraries.Language.Object