SaturationBrightnessKeyBehavior

Package: Libraries.Interface.Behaviors.Controls · Inherits from: Libraries.Language.Object, Libraries.Interface.Behaviors.Behavior

The SaturationBrightnessKeyBehavior changes a focused SaturationBrightnessSquare for one of its arrow keys: Right and Left raise and lower the saturation, Up and Down the brightness, by one percent, or by a tenth of a percent with Shift. Which change it makes is set with Setup, using the constants here.

Example Code

use Libraries.Game.InputTable
use Libraries.Game.InputSet
use Libraries.Interface.Events.KeyboardEvent
use Libraries.Interface.Behaviors.Controls.SaturationBrightnessKeyBehavior

KeyboardEvent keys
InputTable table
table:SetIdentifier("SaturationBrightnessSquare")
InputSet right
right:SetKeyboardInput(keys:RIGHT)
SaturationBrightnessKeyBehavior behavior
behavior:Setup(behavior:SATURATION_UP, false)
table:Add(right, behavior)

Variables

  • integer BRIGHTNESS_DOWN
  • integer SATURATION_UP
  • integer BRIGHTNESS_UP
  • integer SATURATION_DOWN

Actions

Run(Libraries.Interface.Events.BehaviorEvent event)

This action sets which change the key makes, and whether it is a small one, as with Shift.

Parameters

Example

use Libraries.Interface.Behaviors.Controls.SaturationBrightnessKeyBehavior
SaturationBrightnessKeyBehavior behavior
behavior:Setup(behavior:BRIGHTNESS_DOWN, true)

Setup(integer newMove, boolean isFine)

This action sets which change the key makes, and whether it is a small one, as with Shift.

Parameters

  • newMove integer: One of the constants, such as SATURATION_UP.
  • isFine boolean: True for a tenth of a step.

Example

use Libraries.Interface.Behaviors.Controls.SaturationBrightnessKeyBehavior
SaturationBrightnessKeyBehavior behavior
behavior:Setup(behavior:BRIGHTNESS_DOWN, true)

Inherited Actions

7 actions from Libraries.Interface.Behaviors.Behavior
3 actions from Libraries.Language.Object