1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-06 19:41:11 +00:00

Add a network mode setting to bring the editor offline

This PR also adds default font styles for RichTextLabels
in the editor, and improves the introduction dialog
when you don't have any local projects available.

The offline mode is implemented in the asset library
plugin, alongside some code improvements.
This commit is contained in:
Yuri Sizov
2024-01-30 17:35:46 +01:00
parent bac037b1e0
commit 4d97c33503
8 changed files with 165 additions and 67 deletions

View File

@@ -370,6 +370,9 @@ void editor_register_fonts(const Ref<Theme> &p_theme) {
Ref<FontVariation> italic_fc = default_fc->duplicate();
italic_fc->set_variation_transform(Transform2D(1.0, 0.2, 0.0, 1.0, 0.0, 0.0));
Ref<FontVariation> bold_italic_fc = bold_fc->duplicate();
bold_italic_fc->set_variation_transform(Transform2D(1.0, 0.2, 0.0, 1.0, 0.0, 0.0));
// Setup theme.
p_theme->set_default_font(default_fc); // Default theme font config.
@@ -394,6 +397,8 @@ void editor_register_fonts(const Ref<Theme> &p_theme) {
p_theme->set_font("font", "MainScreenButton", bold_fc);
p_theme->set_font_size("font_size", "MainScreenButton", default_font_size + 2 * EDSCALE);
// Labels.
p_theme->set_font("font", "Label", default_fc);
p_theme->set_type_variation("HeaderSmall", "Label");
@@ -408,6 +413,11 @@ void editor_register_fonts(const Ref<Theme> &p_theme) {
p_theme->set_font("font", "HeaderLarge", bold_fc);
p_theme->set_font_size("font_size", "HeaderLarge", default_font_size + 3 * EDSCALE);
p_theme->set_font("normal_font", "RichTextLabel", default_fc);
p_theme->set_font("bold_font", "RichTextLabel", bold_fc);
p_theme->set_font("italics_font", "RichTextLabel", italic_fc);
p_theme->set_font("bold_italics_font", "RichTextLabel", bold_italic_fc);
// Documentation fonts
p_theme->set_font_size("doc_size", EditorStringName(EditorFonts), int(EDITOR_GET("text_editor/help/help_font_size")) * EDSCALE);
p_theme->set_font("doc", EditorStringName(EditorFonts), default_fc);