feat: modules moved and engine moved to submodule
This commit is contained in:
parent
dfb5e645cd
commit
c33d2130cc
5136 changed files with 225275 additions and 64485 deletions
|
|
@ -957,6 +957,7 @@ void EditorThemeManager::_populate_standard_styles(const Ref<EditorTheme> &p_the
|
|||
p_theme->set_color(SceneStringName(font_color), "Tree", p_config.font_color);
|
||||
p_theme->set_color("font_hovered_color", "Tree", p_config.mono_color);
|
||||
p_theme->set_color("font_hovered_dimmed_color", "Tree", p_config.font_color);
|
||||
p_theme->set_color("font_hovered_selected_color", "Tree", p_config.mono_color);
|
||||
p_theme->set_color("font_selected_color", "Tree", p_config.mono_color);
|
||||
p_theme->set_color("font_disabled_color", "Tree", p_config.font_disabled_color);
|
||||
p_theme->set_color("font_outline_color", "Tree", p_config.font_outline_color);
|
||||
|
|
@ -1017,6 +1018,13 @@ void EditorThemeManager::_populate_standard_styles(const Ref<EditorTheme> &p_the
|
|||
style_tree_hover_dimmed->set_border_width_all(0);
|
||||
p_theme->set_stylebox("hovered_dimmed", "Tree", style_tree_hover_dimmed);
|
||||
|
||||
Ref<StyleBoxFlat> style_tree_hover_selected = style_tree_selected->duplicate();
|
||||
style_tree_hover_selected->set_bg_color(p_config.highlight_color * Color(1, 1, 1, 1.2));
|
||||
style_tree_hover_selected->set_border_width_all(0);
|
||||
|
||||
p_theme->set_stylebox("hovered_selected", "Tree", style_tree_hover_selected);
|
||||
p_theme->set_stylebox("hovered_selected_focus", "Tree", style_tree_hover_selected);
|
||||
|
||||
p_theme->set_stylebox("selected_focus", "Tree", style_tree_focus);
|
||||
p_theme->set_stylebox("selected", "Tree", style_tree_selected);
|
||||
|
||||
|
|
@ -1051,7 +1059,7 @@ void EditorThemeManager::_populate_standard_styles(const Ref<EditorTheme> &p_the
|
|||
|
||||
Ref<StyleBoxFlat> style_itemlist_cursor = p_config.base_style->duplicate();
|
||||
style_itemlist_cursor->set_draw_center(false);
|
||||
style_itemlist_cursor->set_border_width_all(p_config.border_width);
|
||||
style_itemlist_cursor->set_border_width_all(MAX(1 * EDSCALE, p_config.border_width));
|
||||
style_itemlist_cursor->set_border_color(p_config.highlight_color);
|
||||
|
||||
Ref<StyleBoxFlat> style_itemlist_hover = style_tree_selected->duplicate();
|
||||
|
|
@ -1287,6 +1295,40 @@ void EditorThemeManager::_populate_standard_styles(const Ref<EditorTheme> &p_the
|
|||
|
||||
// GridContainer.
|
||||
p_theme->set_constant("v_separation", "GridContainer", Math::round(p_config.widget_margin.y - 2 * EDSCALE));
|
||||
|
||||
// FoldableContainer
|
||||
|
||||
Ref<StyleBoxFlat> foldable_container_title = make_flat_stylebox(p_config.dark_color_1.darkened(0.125), p_config.base_margin, p_config.base_margin, p_config.base_margin, p_config.base_margin);
|
||||
foldable_container_title->set_corner_radius(CORNER_BOTTOM_LEFT, 0);
|
||||
foldable_container_title->set_corner_radius(CORNER_BOTTOM_RIGHT, 0);
|
||||
p_theme->set_stylebox("title_panel", "FoldableContainer", foldable_container_title);
|
||||
Ref<StyleBoxFlat> foldable_container_hover = make_flat_stylebox(p_config.dark_color_1.lerp(p_config.base_color, 0.4), p_config.base_margin, p_config.base_margin, p_config.base_margin, p_config.base_margin);
|
||||
foldable_container_hover->set_corner_radius(CORNER_BOTTOM_LEFT, 0);
|
||||
foldable_container_hover->set_corner_radius(CORNER_BOTTOM_RIGHT, 0);
|
||||
p_theme->set_stylebox("title_hover_panel", "FoldableContainer", foldable_container_hover);
|
||||
p_theme->set_stylebox("title_collapsed_panel", "FoldableContainer", make_flat_stylebox(p_config.dark_color_1.darkened(0.125), p_config.base_margin, p_config.base_margin, p_config.base_margin, p_config.base_margin));
|
||||
p_theme->set_stylebox("title_collapsed_hover_panel", "FoldableContainer", make_flat_stylebox(p_config.dark_color_1.lerp(p_config.base_color, 0.4), p_config.base_margin, p_config.base_margin, p_config.base_margin, p_config.base_margin));
|
||||
Ref<StyleBoxFlat> foldable_container_panel = make_flat_stylebox(p_config.dark_color_1, p_config.base_margin, p_config.base_margin, p_config.base_margin, p_config.base_margin);
|
||||
foldable_container_panel->set_corner_radius(CORNER_TOP_LEFT, 0);
|
||||
foldable_container_panel->set_corner_radius(CORNER_TOP_RIGHT, 0);
|
||||
p_theme->set_stylebox(SceneStringName(panel), "FoldableContainer", foldable_container_panel);
|
||||
p_theme->set_stylebox("focus", "FoldableContainer", p_config.button_style_focus);
|
||||
|
||||
p_theme->set_font(SceneStringName(font), "FoldableContainer", p_theme->get_font(SceneStringName(font), SNAME("HeaderSmall")));
|
||||
p_theme->set_font_size(SceneStringName(font_size), "FoldableContainer", p_theme->get_font_size(SceneStringName(font_size), SNAME("HeaderSmall")));
|
||||
|
||||
p_theme->set_color(SceneStringName(font_color), "FoldableContainer", p_config.font_color);
|
||||
p_theme->set_color("hover_font_color", "FoldableContainer", p_config.font_hover_color);
|
||||
p_theme->set_color("collapsed_font_color", "FoldableContainer", p_config.font_pressed_color);
|
||||
p_theme->set_color("font_outline_color", "FoldableContainer", p_config.font_outline_color);
|
||||
|
||||
p_theme->set_icon("expanded_arrow", "FoldableContainer", p_theme->get_icon(SNAME("GuiTreeArrowDown"), EditorStringName(EditorIcons)));
|
||||
p_theme->set_icon("expanded_arrow_mirrored", "FoldableContainer", p_theme->get_icon(SNAME("GuiArrowUp"), EditorStringName(EditorIcons)));
|
||||
p_theme->set_icon("folded_arrow", "FoldableContainer", p_theme->get_icon(SNAME("GuiTreeArrowRight"), EditorStringName(EditorIcons)));
|
||||
p_theme->set_icon("folded_arrow_mirrored", "FoldableContainer", p_theme->get_icon(SNAME("GuiTreeArrowLeft"), EditorStringName(EditorIcons)));
|
||||
|
||||
p_theme->set_constant("outline_size", "FoldableContainer", 0);
|
||||
p_theme->set_constant("h_separation", "FoldableContainer", p_config.separation_margin);
|
||||
}
|
||||
|
||||
// Window and dialogs.
|
||||
|
|
@ -1380,9 +1422,6 @@ void EditorThemeManager::_populate_standard_styles(const Ref<EditorTheme> &p_the
|
|||
p_theme->set_icon("radio_unchecked_disabled", "PopupMenu", p_theme->get_icon(SNAME("GuiRadioUncheckedDisabled"), EditorStringName(EditorIcons)));
|
||||
p_theme->set_icon("submenu", "PopupMenu", p_theme->get_icon(SNAME("ArrowRight"), EditorStringName(EditorIcons)));
|
||||
p_theme->set_icon("submenu_mirrored", "PopupMenu", p_theme->get_icon(SNAME("ArrowLeft"), EditorStringName(EditorIcons)));
|
||||
p_theme->set_icon("visibility_hidden", "PopupMenu", p_theme->get_icon(SNAME("GuiVisibilityHidden"), EditorStringName(EditorIcons)));
|
||||
p_theme->set_icon("visibility_visible", "PopupMenu", p_theme->get_icon(SNAME("GuiVisibilityVisible"), EditorStringName(EditorIcons)));
|
||||
p_theme->set_icon("visibility_xray", "PopupMenu", p_theme->get_icon(SNAME("GuiVisibilityXray"), EditorStringName(EditorIcons)));
|
||||
|
||||
p_theme->set_constant("v_separation", "PopupMenu", p_config.forced_even_separation * EDSCALE);
|
||||
p_theme->set_constant("outline_size", "PopupMenu", 0);
|
||||
|
|
@ -1475,6 +1514,7 @@ void EditorThemeManager::_populate_standard_styles(const Ref<EditorTheme> &p_the
|
|||
// Label.
|
||||
|
||||
p_theme->set_stylebox(CoreStringName(normal), "Label", p_config.base_empty_style);
|
||||
p_theme->set_stylebox("focus", "Label", p_config.button_style_focus);
|
||||
|
||||
p_theme->set_color(SceneStringName(font_color), "Label", p_config.font_color);
|
||||
p_theme->set_color("font_shadow_color", "Label", Color(0, 0, 0, 0));
|
||||
|
|
@ -1541,6 +1581,7 @@ void EditorThemeManager::_populate_standard_styles(const Ref<EditorTheme> &p_the
|
|||
// GraphEdit.
|
||||
|
||||
p_theme->set_stylebox(SceneStringName(panel), "GraphEdit", p_config.tree_panel_style);
|
||||
p_theme->set_stylebox("panel_focus", "GraphEdit", p_config.button_style_focus);
|
||||
p_theme->set_stylebox("menu_panel", "GraphEdit", make_flat_stylebox(p_config.dark_color_1 * Color(1, 1, 1, 0.6), 4, 2, 4, 2, 3));
|
||||
|
||||
float grid_base_brightness = p_config.dark_theme ? 1.0 : 0.0;
|
||||
|
|
@ -1672,9 +1713,11 @@ void EditorThemeManager::_populate_standard_styles(const Ref<EditorTheme> &p_the
|
|||
|
||||
p_theme->set_stylebox(SceneStringName(panel), "GraphNode", gn_panel_style);
|
||||
p_theme->set_stylebox("panel_selected", "GraphNode", gn_panel_selected_style);
|
||||
p_theme->set_stylebox("panel_focus", "GraphNode", p_config.button_style_focus);
|
||||
p_theme->set_stylebox("titlebar", "GraphNode", gn_titlebar_style);
|
||||
p_theme->set_stylebox("titlebar_selected", "GraphNode", gn_titlebar_selected_style);
|
||||
p_theme->set_stylebox("slot", "GraphNode", gn_slot_style);
|
||||
p_theme->set_stylebox("slot_selected", "GraphNode", p_config.button_style_focus);
|
||||
|
||||
p_theme->set_color("resizer_color", "GraphNode", gn_decoration_color);
|
||||
|
||||
|
|
@ -1750,6 +1793,9 @@ void EditorThemeManager::_populate_standard_styles(const Ref<EditorTheme> &p_the
|
|||
// ColorPicker and related nodes.
|
||||
{
|
||||
// ColorPicker.
|
||||
p_config.circle_style_focus = p_config.button_style_focus->duplicate();
|
||||
p_config.circle_style_focus->set_corner_radius_all(256 * EDSCALE);
|
||||
p_config.circle_style_focus->set_corner_detail(32 * EDSCALE);
|
||||
|
||||
p_theme->set_constant("margin", "ColorPicker", p_config.base_margin);
|
||||
p_theme->set_constant("sv_width", "ColorPicker", 256 * EDSCALE);
|
||||
|
|
@ -1758,6 +1804,11 @@ void EditorThemeManager::_populate_standard_styles(const Ref<EditorTheme> &p_the
|
|||
p_theme->set_constant("label_width", "ColorPicker", 10 * EDSCALE);
|
||||
p_theme->set_constant("center_slider_grabbers", "ColorPicker", 1);
|
||||
|
||||
p_theme->set_stylebox("sample_focus", "ColorPicker", p_config.button_style_focus);
|
||||
p_theme->set_stylebox("picker_focus_rectangle", "ColorPicker", p_config.button_style_focus);
|
||||
p_theme->set_stylebox("picker_focus_circle", "ColorPicker", p_config.circle_style_focus);
|
||||
p_theme->set_color("focused_not_editing_cursor_color", "ColorPicker", p_config.highlight_color);
|
||||
|
||||
p_theme->set_icon("screen_picker", "ColorPicker", p_theme->get_icon(SNAME("ColorPick"), EditorStringName(EditorIcons)));
|
||||
p_theme->set_icon("shape_circle", "ColorPicker", p_theme->get_icon(SNAME("PickerShapeCircle"), EditorStringName(EditorIcons)));
|
||||
p_theme->set_icon("shape_rect", "ColorPicker", p_theme->get_icon(SNAME("PickerShapeRectangle"), EditorStringName(EditorIcons)));
|
||||
|
|
@ -2609,6 +2660,7 @@ void EditorThemeManager::_generate_text_editor_defaults(ThemeConfiguration &p_co
|
|||
const Color function_color = p_config.dark_theme ? Color(0.34, 0.7, 1.0) : Color(0, 0.225, 0.9, 1);
|
||||
const Color member_variable_color = p_config.dark_theme ? Color(0.34, 0.7, 1.0).lerp(p_config.mono_color, 0.6) : Color(0, 0.4, 0.68, 1);
|
||||
const Color mark_color = Color(p_config.error_color.r, p_config.error_color.g, p_config.error_color.b, 0.3);
|
||||
const Color warning_color = Color(p_config.warning_color.r, p_config.warning_color.g, p_config.warning_color.b, 0.15);
|
||||
const Color bookmark_color = Color(0.08, 0.49, 0.98);
|
||||
const Color breakpoint_color = p_config.dark_theme ? p_config.error_color : Color(1, 0.27, 0.2, 1);
|
||||
const Color executing_line_color = Color(0.98, 0.89, 0.27);
|
||||
|
|
@ -2652,6 +2704,7 @@ void EditorThemeManager::_generate_text_editor_defaults(ThemeConfiguration &p_co
|
|||
setting->set_initial_value("text_editor/theme/highlighting/function_color", function_color, true);
|
||||
setting->set_initial_value("text_editor/theme/highlighting/member_variable_color", member_variable_color, true);
|
||||
setting->set_initial_value("text_editor/theme/highlighting/mark_color", mark_color, true);
|
||||
setting->set_initial_value("text_editor/theme/highlighting/warning_color", warning_color, true);
|
||||
setting->set_initial_value("text_editor/theme/highlighting/bookmark_color", bookmark_color, true);
|
||||
setting->set_initial_value("text_editor/theme/highlighting/breakpoint_color", breakpoint_color, true);
|
||||
setting->set_initial_value("text_editor/theme/highlighting/executing_line_color", executing_line_color, true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue