1 Star 1 Fork 0

天天编程/godot-docs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
class_colorpickerbutton.rst 6.37 KB
一键复制 编辑 原始数据 按行查看 历史
github_url: hide

ColorPickerButton

Inherits: :ref:`Button<class_Button>` < :ref:`BaseButton<class_BaseButton>` < :ref:`Control<class_Control>` < :ref:`CanvasItem<class_CanvasItem>` < :ref:`Node<class_Node>` < :ref:`Object<class_Object>`

Button that pops out a :ref:`ColorPicker<class_ColorPicker>`.

Description

Encapsulates a :ref:`ColorPicker<class_ColorPicker>` making it accessible by pressing a button. Pressing the button will toggle the :ref:`ColorPicker<class_ColorPicker>` visibility.

Properties

:ref:`Color<class_Color>` :ref:`color<class_ColorPickerButton_property_color>` Color( 0, 0, 0, 1 )
:ref:`bool<class_bool>` :ref:`edit_alpha<class_ColorPickerButton_property_edit_alpha>` true
:ref:`bool<class_bool>` toggle_mode O: true

Methods

:ref:`ColorPicker<class_ColorPicker>` :ref:`get_picker<class_ColorPickerButton_method_get_picker>` ( )
:ref:`PopupPanel<class_PopupPanel>` :ref:`get_popup<class_ColorPickerButton_method_get_popup>` ( )

Theme Properties

:ref:`Texture2D<class_Texture2D>` bg  
:ref:`StyleBox<class_StyleBox>` disabled  
:ref:`StyleBox<class_StyleBox>` focus  
:ref:`Font<class_Font>` font  
:ref:`Color<class_Color>` font_color Color( 1, 1, 1, 1 )
:ref:`Color<class_Color>` font_color_disabled Color( 0.9, 0.9, 0.9, 0.3 )
:ref:`Color<class_Color>` font_color_hover Color( 1, 1, 1, 1 )
:ref:`Color<class_Color>` font_color_pressed Color( 0.8, 0.8, 0.8, 1 )
:ref:`StyleBox<class_StyleBox>` hover  
:ref:`int<class_int>` hseparation 2
:ref:`StyleBox<class_StyleBox>` normal  
:ref:`StyleBox<class_StyleBox>` pressed  

Signals

Emitted when the color changes.


  • picker_created ( )

Emitted when the :ref:`ColorPicker<class_ColorPicker>` is created (the button is pressed for the first time).


  • popup_closed ( )

Emitted when the :ref:`ColorPicker<class_ColorPicker>` is closed.

Property Descriptions

Default Color( 0, 0, 0, 1 )
Setter set_pick_color(value)
Getter get_pick_color()

The currently selected color.


Default true
Setter set_edit_alpha(value)
Getter is_editing_alpha()

If true, the alpha channel in the displayed :ref:`ColorPicker<class_ColorPicker>` will be visible.

Method Descriptions

Returns the :ref:`ColorPicker<class_ColorPicker>` that this node toggles.


Returns the control's :ref:`PopupPanel<class_PopupPanel>` which allows you to connect to popup signals. This allows you to handle events when the ColorPicker is shown or hidden.

Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ttcode-net/godot-docs.git
git@gitee.com:ttcode-net/godot-docs.git
ttcode-net
godot-docs
godot-docs
master

搜索帮助