Enumerationmigueldeicaza.swiftgodot 0.45.0SwiftGodot
ColorModeType
ColorPicker.swift:23enum ColorModeType
Cases
case rgb
Allows editing the color with Red/Green/Blue sliders.
case hsv
Allows editing the color with Hue/Saturation/Value sliders.
case raw
Allows the color R, G, B component values to go beyond 1.0, which can be used for certain special operations that require it (like tinting without darkening or rendering sprites in HDR).
case okhsl
Allows editing the color with Hue/Saturation/Lightness sliders.
Other members in extension
View members
Hide members
This section is hidden by default because it contains too many (25) members.
Types
enum PickerShapeType
class Signal1
Signal support.
class Signal2
Signal support.
class Signal3
Signal support.
Type members
Instance members
var canAddSwatches: Bool
If
true
, it’s possible to add presets under Swatches. Iffalse
, the button to add presets is disabled.var color: Color
The currently selected color.
var colorChanged: Signal1
Emitted when the color is changed.
var colorMode: ColorPicker.ColorModeType
The currently selected color mode. See
ColorModeType
.var colorModesVisible: Bool
If
true
, the color mode buttons are visible.var deferredMode: Bool
If
true
, the color will apply only after the user releases the mouse button, otherwise it will apply immediately even in mouse motion event (which can cause performance issues).var editAlpha: Bool
If
true
, shows an alpha channel slider (opacity).var hexVisible: Bool
If
true
, the hex color code input field is visible.var pickerShape: ColorPicker.PickerShapeType
The shape of the color space view. See
PickerShapeType
.var presetAdded: Signal2
Emitted when a preset is added.
var presetRemoved: Signal3
Emitted when a preset is removed.
var presetsVisible: Bool
If
true
, the Swatches and Recent Colors presets are visible.var samplerVisible: Bool
If
true
, the color sampler and color preview are visible.var slidersVisible: Bool
If
true
, the color sliders are visible.func addPreset(color: Color
) Adds the given color to a list of color presets. The presets are displayed in the color picker and the user will be able to select them.
func addRecentPreset(color: Color
) Adds the given color to a list of color recent presets so that it can be picked later. Recent presets are the colors that were picked recently, a new preset is automatically created and added to recent presets when you pick a new color.
func erasePreset(color: Color
) Removes the given color from the list of color presets of this color picker.
func eraseRecentPreset(color: Color
) Removes the given color from the list of color recent presets of this color picker.
func getPresets(
) -> PackedColorArray Returns the list of colors in the presets of the color picker.
func getRecentPresets(
) -> PackedColorArray Returns the list of colors in the recent presets of the color picker.
Citizens in SwiftGodot
Conformances
protocol CaseIterable
A type that provides a collection of all of its values.
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
Type members
Instance members
var debugDescription: String
A textual representation of this instance, suitable for debugging
Type features
static func != (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether two values are not equal.