summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-01-21 20:52:16 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-01-21 20:52:16 +0100
commit906ee0b2193475c9de30519a1cbb99c1e7d86598 (patch)
treee07f5fc31e3782497988598d8a6f3ab84e48e1a1 /editor
parent229c82690dde669482c5e0002b6a887f75c91710 (diff)
parenta3661ad0793a4edab75975ce9718ea16670fd6e4 (diff)
Merge pull request #67253 from KoBeWi/PICKER_USAGE_NO_EDITOR
Remove editor dependencies from ColorPicker
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_node.cpp7
-rw-r--r--editor/editor_node.h2
2 files changed, 5 insertions, 4 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index b0278030f9..bbd927dcd9 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -3712,11 +3712,12 @@ void EditorNode::set_current_scene(int p_idx) {
call_deferred(SNAME("_set_main_scene_state"), state, get_edited_scene()); // Do after everything else is done setting up.
}
-void EditorNode::setup_color_picker(ColorPicker *picker) {
+void EditorNode::setup_color_picker(ColorPicker *p_picker) {
+ p_picker->set_editor_settings(EditorSettings::get_singleton());
int default_color_mode = EDITOR_GET("interface/inspector/default_color_picker_mode");
int picker_shape = EDITOR_GET("interface/inspector/default_color_picker_shape");
- picker->set_color_mode((ColorPicker::ColorModeType)default_color_mode);
- picker->set_picker_shape((ColorPicker::PickerShapeType)picker_shape);
+ p_picker->set_color_mode((ColorPicker::ColorModeType)default_color_mode);
+ p_picker->set_picker_shape((ColorPicker::PickerShapeType)picker_shape);
}
bool EditorNode::is_scene_open(const String &p_path) {
diff --git a/editor/editor_node.h b/editor/editor_node.h
index fb2544c141..d7a4bd4434 100644
--- a/editor/editor_node.h
+++ b/editor/editor_node.h
@@ -824,7 +824,7 @@ public:
void set_current_scene(int p_idx);
- void setup_color_picker(ColorPicker *picker);
+ void setup_color_picker(ColorPicker *p_picker);
void request_instantiate_scene(const String &p_path);
void request_instantiate_scenes(const Vector<String> &p_files);