ColorPickerInputSetup

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

The ColorPickerInputSetup class adds the input of a ColorPicker's parts to a game's input: - "HueRing": the keys of a Slider (the "Slider" input group), with the mouse and fingers setting the hue from the angle of the pointer around the ring's center. - "SaturationBrightnessSquare": Right and Left raise and lower the saturation, Up and Down the brightness, with Shift for a tenth of a step; the mouse and fingers set both from the place of the pointer. - "ColorPicker": Enter keeps the color and Escape puts the old one back, anywhere in the picker where the focused part doesn't use the key. DefaultInputSets calls Setup when the game starts, so most users won't need to.

Example Code

use Libraries.Game.GameStateManager
use Libraries.Interface.Behaviors.Controls.ColorPickerInputSetup

GameStateManager manager
ColorPickerInputSetup setup
setup:Setup(manager:GetInput())

Actions

Setup(Libraries.Game.GameInput gameInput)

This action adds the "HueRing", "SaturationBrightnessSquare" and "ColorPicker" input tables to the game's input. The "Slider" table should be added first, since the ring copies its keys.

Parameters

Example

use Libraries.Game.GameStateManager
use Libraries.Interface.Behaviors.Controls.ColorPickerInputSetup

GameStateManager manager
ColorPickerInputSetup setup
setup:Setup(manager:GetInput())

Inherited Actions

3 actions from Libraries.Language.Object