Fixed ColorPicker so the vertical option is not available in editor.
This commit is contained in:
parent
2e3662acbd
commit
c685c47f8a
3 changed files with 4 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<class name="ColorPicker" inherits="BoxContainer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
<class name="ColorPicker" inherits="VBoxContainer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||||||
<brief_description>
|
<brief_description>
|
||||||
Color picker control.
|
Color picker control.
|
||||||
</brief_description>
|
</brief_description>
|
||||||
|
@ -76,7 +76,6 @@
|
||||||
<member name="presets_visible" type="bool" setter="set_presets_visible" getter="are_presets_visible" default="true">
|
<member name="presets_visible" type="bool" setter="set_presets_visible" getter="are_presets_visible" default="true">
|
||||||
If [code]true[/code], saved color presets are visible.
|
If [code]true[/code], saved color presets are visible.
|
||||||
</member>
|
</member>
|
||||||
<member name="vertical" type="bool" setter="set_vertical" getter="is_vertical" overrides="BoxContainer" default="true" />
|
|
||||||
</members>
|
</members>
|
||||||
<signals>
|
<signals>
|
||||||
<signal name="color_changed">
|
<signal name="color_changed">
|
||||||
|
|
|
@ -1529,8 +1529,7 @@ void ColorPicker::_bind_methods() {
|
||||||
BIND_ENUM_CONSTANT(SHAPE_OKHSL_CIRCLE);
|
BIND_ENUM_CONSTANT(SHAPE_OKHSL_CIRCLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
ColorPicker::ColorPicker() :
|
ColorPicker::ColorPicker() {
|
||||||
BoxContainer(true) {
|
|
||||||
HBoxContainer *hb_edit = memnew(HBoxContainer);
|
HBoxContainer *hb_edit = memnew(HBoxContainer);
|
||||||
add_child(hb_edit, false, INTERNAL_MODE_FRONT);
|
add_child(hb_edit, false, INTERNAL_MODE_FRONT);
|
||||||
hb_edit->set_v_size_flags(SIZE_SHRINK_BEGIN);
|
hb_edit->set_v_size_flags(SIZE_SHRINK_BEGIN);
|
||||||
|
|
|
@ -68,8 +68,8 @@ public:
|
||||||
~ColorPresetButton();
|
~ColorPresetButton();
|
||||||
};
|
};
|
||||||
|
|
||||||
class ColorPicker : public BoxContainer {
|
class ColorPicker : public VBoxContainer {
|
||||||
GDCLASS(ColorPicker, BoxContainer);
|
GDCLASS(ColorPicker, VBoxContainer);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum ColorModeType {
|
enum ColorModeType {
|
||||||
|
|
Loading…
Reference in a new issue