ColorPickerButton

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

Un botón que abre un ColorPicker cuando se pulsa.

Descripción

Encapsula un ColorPicker, haciéndolo accesible al pulsar un botón. Al pulsar el botón se activará/desactivará la visibilidad del ColorPicker.

Véase también BaseButton, que contiene propiedades y métodos comunes asociados a este nodo.

Nota: Por defecto, el botón puede no ser lo suficientemente ancho para que la muestra de previsualización del color sea visible. Asegúrate de establecer Control.custom_minimum_size a un valor lo suficientemente grande para darle al botón espacio suficiente.

Tutoriales

Propiedades

Color

color

Color(0, 0, 0, 1)

bool

edit_alpha

true

bool

edit_intensity

true

bool

toggle_mode

true (overrides BaseButton)

Métodos

ColorPicker

get_picker()

PopupPanel

get_popup()

Propiedades del Tema

Texture2D

bg


Señales

color_changed(color: Color) 🔗

Emitida cuando el color cambia.


picker_created() 🔗

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


popup_closed() 🔗

Emitida cuando ColorPicker está cerrado.


Descripciones de Propiedades

Color color = Color(0, 0, 0, 1) 🔗

  • void set_pick_color(value: Color)

  • Color get_pick_color()

El color actualmente seleccionado.


bool edit_alpha = true 🔗

  • void set_edit_alpha(value: bool)

  • bool is_editing_alpha()

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


bool edit_intensity = true 🔗

  • void set_edit_intensity(value: bool)

  • bool is_editing_intensity()

If true, the intensity slider in the displayed ColorPicker will be visible.


Descripciones de Métodos

ColorPicker get_picker() 🔗

Devuelve el ColorPicker que este nodo activa/desactiva.

Advertencia: Este es un nodo interno requerido, removerlo y liberarlo puede causar un fallo. Si deseas ocultarlo o alguno de sus hijos, usa su propiedad CanvasItem.visible.


PopupPanel get_popup() 🔗

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 Window.visible property.


Descripciones de las propiedades del tema

Texture2D bg 🔗

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