ColorPickerButton

Inherits: Button < BaseButton < Control < CanvasItem < Node < Object

Botón que hace aparecer un ColorPicker.

Descripción

Encapsulates a ColorPicker making it accessible by pressing a button. Pressing the button will toggle the ColorPicker visibility.

See also BaseButton which contains common properties and methods associated with this node.

Note: By default, the button may not be wide enough for the color preview swatch to be visible. Make sure to set Control.rect_min_size to a big enough value to give the button enough space.

Tutoriales

Propiedades

Color

color

Color( 0, 0, 0, 1 )

bool

edit_alpha

true

bool

toggle_mode

true (overrides BaseButton)

Métodos

ColorPicker

get_picker ( )

PopupPanel

get_popup ( )

Propiedades del Theme

Color

font_color

Color( 1, 1, 1, 1 )

Color

font_color_disabled

Color( 0.9, 0.9, 0.9, 0.3 )

Color

font_color_focus

Color( 1, 1, 1, 1 )

Color

font_color_hover

Color( 1, 1, 1, 1 )

Color

font_color_pressed

Color( 0.8, 0.8, 0.8, 1 )

int

hseparation

2

Font

font

Texture

bg

StyleBox

disabled

StyleBox

focus

StyleBox

hover

StyleBox

normal

StyleBox

pressed

Señales

  • color_changed ( Color color )

Emitido cuando el color cambia.


  • picker_created ( )

Se emite cuando se crea el ColorPicker (se pulsa el botón por primera vez).


  • popup_closed ( )

Emitido cuando el ColorPicker está cerrado.

Descripciones de Propiedades

Default

Color( 0, 0, 0, 1 )

Setter

set_pick_color(value)

Getter

get_pick_color()

El color actualmente seleccionado.


Default

true

Setter

set_edit_alpha(value)

Getter

is_editing_alpha()

Si true, el canal alfa en el ColorPicker visualizado será visible.

Descripciones de Métodos

Returns the ColorPicker that this node toggles.

Warning: This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their CanvasItem.visible property.


Returns the control's PopupPanel which allows you to connect to popup signals. This allows you to handle events when the ColorPicker is shown or hidden.

Warning: This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their CanvasItem.visible property.

Theme Property Descriptions

Default

Color( 1, 1, 1, 1 )

El Color del texto predeterminado para el ColorPickerButton.


  • Color font_color_disabled

Default

Color( 0.9, 0.9, 0.9, 0.3 )

Color del texto utilizado cuando el ColorPickerButton está desactivado.


Default

Color( 1, 1, 1, 1 )

Text Color used when the ColorPickerButton is focused. Only replaces the normal text color of the button. Disabled, hovered, and pressed states take precedence over this color.


Default

Color( 1, 1, 1, 1 )

Color del texto usado cuando el ColorPickerButton tiene el cursor encima.


  • Color font_color_pressed

Default

Color( 0.8, 0.8, 0.8, 1 )

Color del texto utilizado cuando se pulsa el ColorPickerButton.


  • int hseparation

Default

2

El espacio horizontal entre el icono y el texto de ColorPickerButton.


Font del texto de ColorPickerButton.


El fondo del rectángulo de vista previa de color en el botón.


StyleBox utilizado cuando el ColorPickerButton está desactivado.


StyleBox usado cuando el ColorPickerButton está enfocado. Se muestra sobre el StyleBox actual, por lo que al usar StyleBoxEmpty sólo se desactivará el efecto visual de enfoque.


StyleBox usado cuando el ColorPickerButton tiene el cursor encima.


StyleBox por defecto para el ColorPickerButton.


StyleBox que se utiliza cuando se pulsa el ColorPickerButton.