1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-06 17:25:19 +00:00

Color Pickers Respect Settings

Updated editor_node with function that sets up color pickers throughout Godot to respect editor's settings.
This commit is contained in:
Guh-Feng
2022-06-30 23:43:46 -04:00
parent 976cb7ea9f
commit 1b8652e86a
10 changed files with 22 additions and 23 deletions

View File

@@ -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) {