summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-09-03 12:36:04 +0200
committerGitHub <noreply@github.com>2019-09-03 12:36:04 +0200
commitdd7c4c62ab35b75ef7f873b27d6ba93cb8ebefab (patch)
tree8bbbfcff7c72e1e3e6047e46298c5f486100efae /editor/plugins
parent2ee0ca3d43b93a102aaf037c0d947c70359c20fb (diff)
parent1de3ec911fb365979595942e1c4b88ac19192188 (diff)
Merge pull request #31782 from aole/persist-ColorPicker-color-mode
Persist ColorPicker color mode
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/script_text_editor.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index edc454ad1c..3b300a7ad5 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -1741,6 +1741,13 @@ ScriptTextEditor::ScriptTextEditor() {
color_panel->add_child(color_picker);
color_picker->connect("color_changed", this, "_color_changed");
+ // get default color picker mode from editor settings
+ int default_color_mode = EDITOR_GET("interface/inspector/default_color_picker_mode");
+ if (default_color_mode == 1)
+ color_picker->set_hsv_mode(true);
+ else if (default_color_mode == 2)
+ color_picker->set_raw_mode(true);
+
edit_hb = memnew(HBoxContainer);
edit_menu = memnew(MenuButton);