summaryrefslogtreecommitdiff
path: root/editor/editor_node.cpp
diff options
context:
space:
mode:
authorGuh-Feng <58538080+Guh-Feng@users.noreply.github.com>2022-06-30 23:43:46 -0400
committerGuh-Feng <58538080+Guh-Feng@users.noreply.github.com>2022-07-21 18:11:09 -0400
commit1b8652e86a383747cc2d8ec803b4dcd49cb7469d (patch)
tree1a08bd998705cf549b3e4543c485c825e0191dd9 /editor/editor_node.cpp
parent976cb7ea9f59813f99e06c4c345c19ff68c2c591 (diff)
Color Pickers Respect Settings
Updated editor_node with function that sets up color pickers throughout Godot to respect editor's settings.
Diffstat (limited to 'editor/editor_node.cpp')
-rw-r--r--editor/editor_node.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 166dcf19c8..2483638d3d 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -3588,6 +3588,13 @@ 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) {
+ 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);
+}
+
bool EditorNode::is_scene_open(const String &p_path) {
for (int i = 0; i < editor_data.get_edited_scene_count(); i++) {
if (editor_data.get_scene_path(i) == p_path) {