summaryrefslogtreecommitdiffstats
path: root/editor/plugins/script_text_editor.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2022-07-22 23:46:27 +0200
committerGitHub <noreply@github.com>2022-07-22 23:46:27 +0200
commite5df1e65f935ba2df73c9f53d930d4a9cec554fc (patch)
tree54ca25e53f4721db2a994c9a829e4b5ed1b5d1b3 /editor/plugins/script_text_editor.cpp
parent4f7bfacfcd65ab630f4e3f476d3f0ff12494a0b3 (diff)
parent1b8652e86a383747cc2d8ec803b4dcd49cb7469d (diff)
downloadredot-engine-e5df1e65f935ba2df73c9f53d930d4a9cec554fc.tar.gz
Merge pull request #62581 from Guh-Feng/Color-Picker-Update
Diffstat (limited to 'editor/plugins/script_text_editor.cpp')
-rw-r--r--editor/plugins/script_text_editor.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index fc545b44e8..14e3eb5402 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -1862,16 +1862,10 @@ void ScriptTextEditor::_enable_code_editor() {
color_picker = memnew(ColorPicker);
color_picker->set_deferred_mode(true);
color_picker->connect("color_changed", callable_mp(this, &ScriptTextEditor::_color_changed));
+ color_panel->connect("about_to_popup", callable_mp(EditorNode::get_singleton(), &EditorNode::setup_color_picker), varray(color_picker));
color_panel->add_child(color_picker);
- // get default color picker mode from editor settings
- int default_color_mode = EDITOR_GET("interface/inspector/default_color_picker_mode");
- color_picker->set_color_mode((ColorPicker::ColorModeType)default_color_mode);
-
- int picker_shape = EDITOR_GET("interface/inspector/default_color_picker_shape");
- color_picker->set_picker_shape((ColorPicker::PickerShapeType)picker_shape);
-
quick_open = memnew(ScriptEditorQuickOpen);
quick_open->connect("goto_line", callable_mp(this, &ScriptTextEditor::_goto_line));
add_child(quick_open);