Documentation
¶
Overview ¶
Package ColorPicker provides methods for working with ColorPicker object instances.
Index ¶
- type Advanced
- type Any
- type ColorModeType
- type Instance
- func (self Instance) AddPreset(color Color.RGBA)
- func (self Instance) AddRecentPreset(color Color.RGBA)
- func (self Instance) AsBoxContainer() BoxContainer.Instance
- func (self Instance) AsCanvasItem() CanvasItem.Instance
- func (self Instance) AsColorPicker() Instance
- func (self Instance) AsContainer() Container.Instance
- func (self Instance) AsControl() Control.Instance
- func (self Instance) AsNode() Node.Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsVBoxContainer() VBoxContainer.Instance
- func (self Instance) CanAddSwatches() bool
- func (self Instance) Color() Color.RGBA
- func (self Instance) ColorMode() gdclass.ColorPickerColorModeType
- func (self Instance) ColorModesVisible() bool
- func (self Instance) DeferredMode() bool
- func (self Instance) EditAlpha() bool
- func (self Instance) ErasePreset(color Color.RGBA)
- func (self Instance) EraseRecentPreset(color Color.RGBA)
- func (self Instance) GetPresets() []Color.RGBA
- func (self Instance) GetRecentPresets() []Color.RGBA
- func (self Instance) HexVisible() bool
- func (self Instance) OnColorChanged(cb func(color Color.RGBA))
- func (self Instance) OnPresetAdded(cb func(color Color.RGBA))
- func (self Instance) OnPresetRemoved(cb func(color Color.RGBA))
- func (self Instance) PickerShape() gdclass.ColorPickerPickerShapeType
- func (self Instance) PresetsVisible() bool
- func (self Instance) SamplerVisible() bool
- func (self Instance) SetCanAddSwatches(value bool)
- func (self Instance) SetColor(value Color.RGBA)
- func (self Instance) SetColorMode(value gdclass.ColorPickerColorModeType)
- func (self Instance) SetColorModesVisible(value bool)
- func (self Instance) SetDeferredMode(value bool)
- func (self Instance) SetEditAlpha(value bool)
- func (self Instance) SetHexVisible(value bool)
- func (self Instance) SetPickerShape(value gdclass.ColorPickerPickerShapeType)
- func (self Instance) SetPresetsVisible(value bool)
- func (self Instance) SetSamplerVisible(value bool)
- func (self Instance) SetSlidersVisible(value bool)
- func (self Instance) SlidersVisible() bool
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) Virtual(name string) reflect.Value
- type PickerShapeType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type ColorModeType ¶
type ColorModeType = gdclass.ColorPickerColorModeType //gd:ColorPicker.ColorModeType
const ( /*Allows editing the color with Red/Green/Blue sliders.*/ ModeRgb ColorModeType = 0 /*Allows editing the color with Hue/Saturation/Value sliders.*/ ModeHsv ColorModeType = 1 /*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).*/ ModeRaw ColorModeType = 2 /*Allows editing the color with Hue/Saturation/Lightness sliders. OKHSL is a new color space similar to HSL but that better match perception by leveraging the Oklab color space which is designed to be simple to use, while doing a good job at predicting perceived lightness, chroma and hue. [url=https://bottosson.github.io/posts/colorpicker/]Okhsv and Okhsl color spaces[/url]*/ ModeOkhsl ColorModeType = 3 )
type Instance ¶
type Instance [1]gdclass.ColorPicker
A widget that provides an interface for selecting or modifying a color. It can optionally provide functionalities like a color sampler (eyedropper), color modes, and presets. [b]Note:[/b] This control is the color picker widget itself. You can use a [ColorPickerButton] instead if you need a button that brings up a [ColorPicker] in a popup.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AddPreset ¶
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. [b]Note:[/b] The presets list is only for [i]this[/i] color picker.
func (Instance) AddRecentPreset ¶
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. [b]Note:[/b] The recent presets list is only for [i]this[/i] color picker.
func (Instance) AsBoxContainer ¶
func (self Instance) AsBoxContainer() BoxContainer.Instance
func (Instance) AsCanvasItem ¶
func (self Instance) AsCanvasItem() CanvasItem.Instance
func (Instance) AsColorPicker ¶
func (Instance) AsContainer ¶
func (Instance) AsVBoxContainer ¶
func (self Instance) AsVBoxContainer() VBoxContainer.Instance
func (Instance) CanAddSwatches ¶
func (Instance) ColorMode ¶
func (self Instance) ColorMode() gdclass.ColorPickerColorModeType
func (Instance) ColorModesVisible ¶
func (Instance) DeferredMode ¶
func (Instance) ErasePreset ¶
Removes the given color from the list of color presets of this color picker.
func (Instance) EraseRecentPreset ¶
Removes the given color from the list of color recent presets of this color picker.
func (Instance) GetPresets ¶
Returns the list of colors in the presets of the color picker.
func (Instance) GetRecentPresets ¶
Returns the list of colors in the recent presets of the color picker.
func (Instance) HexVisible ¶
func (Instance) OnColorChanged ¶
func (Instance) OnPresetAdded ¶
func (Instance) OnPresetRemoved ¶
func (Instance) PickerShape ¶
func (self Instance) PickerShape() gdclass.ColorPickerPickerShapeType
func (Instance) PresetsVisible ¶
func (Instance) SamplerVisible ¶
func (Instance) SetCanAddSwatches ¶
func (Instance) SetColorMode ¶
func (self Instance) SetColorMode(value gdclass.ColorPickerColorModeType)
func (Instance) SetColorModesVisible ¶
func (Instance) SetDeferredMode ¶
func (Instance) SetEditAlpha ¶
func (Instance) SetHexVisible ¶
func (Instance) SetPickerShape ¶
func (self Instance) SetPickerShape(value gdclass.ColorPickerPickerShapeType)
func (Instance) SetPresetsVisible ¶
func (Instance) SetSamplerVisible ¶
func (Instance) SetSlidersVisible ¶
func (Instance) SlidersVisible ¶
func (*Instance) UnsafePointer ¶
type PickerShapeType ¶
type PickerShapeType = gdclass.ColorPickerPickerShapeType //gd:ColorPicker.PickerShapeType
const ( /*HSV Color Model rectangle color space.*/ ShapeHsvRectangle PickerShapeType = 0 /*HSV Color Model rectangle color space with a wheel.*/ ShapeHsvWheel PickerShapeType = 1 /*HSV Color Model circle color space. Use Saturation as a radius.*/ ShapeVhsCircle PickerShapeType = 2 /*HSL OK Color Model circle color space.*/ ShapeOkhslCircle PickerShapeType = 3 /*The color space shape and the shape select button are hidden. Can't be selected from the shapes popup.*/ ShapeNone PickerShapeType = 4 )