From 58cc0014ed1fd60b6cb8f217027e26e05ee231a3 Mon Sep 17 00:00:00 2001 From: LMW Date: Tue, 28 Apr 2026 22:39:12 +0800 Subject: [PATCH] Added interface fonts options --- material_maker/globals.gd | 7 + material_maker/main_window.gd | 16 +- material_maker/nodes/base.gd | 2 +- material_maker/nodes/generic/generic.gd | 4 +- material_maker/nodes/minimal.gd | 2 + material_maker/nodes/portal/portal.gd | 10 +- .../panels/graph_edit/graph_edit.gd | 1 - .../panels/graph_edit/graph_zoom_menu.gd | 4 + material_maker/panels/library/library.gd | 7 +- .../panels/preview_2d/export_menu.gd | 2 + .../panels/preview_3d/export_menu.gd | 7 + material_maker/theme/classic.tres | 2 +- material_maker/theme/default dark.tres | 2 +- material_maker/theme/default.tres | 6 +- material_maker/theme/font_manager.gd | 79 ++++ material_maker/theme/font_manager.gd.uid | 1 + .../theme/fonts/system/system_bold_font.tres | 14 + .../theme/fonts/system/system_code_font.tres | 13 + .../theme/fonts/system/system_main_font.tres | 13 + .../fonts/system/system_medium_font.tres | 14 + material_maker/theme/fonts/ui/bold_font.tres | 8 + .../theme/fonts/ui/classic_font.tres | 7 + material_maker/theme/fonts/ui/code_font.tres | 8 + material_maker/theme/fonts/ui/main_font.tres | 8 + .../theme/fonts/ui/medium_font.tres | 8 + .../widgets/code_editor/code_editor.gd | 4 + .../widgets/float_edit/float_edit.gd | 2 + .../render_counter/render_counter.tscn | 22 +- .../widgets/splines_edit/splines_editor.gd | 2 +- .../windows/add_node_popup/quick_button.tscn | 4 +- .../windows/material_editor/export_editor.gd | 2 + .../material_editor/export_editor.tscn | 83 +++-- .../windows/preferences/file_option.gd | 30 ++ .../windows/preferences/file_option.gd.uid | 1 + .../windows/preferences/file_option.tscn | 31 ++ .../windows/preferences/preferences.tscn | 351 +++++++++++++----- .../windows/preferences/preferences_tree.gd | 1 + 37 files changed, 607 insertions(+), 171 deletions(-) create mode 100644 material_maker/theme/font_manager.gd create mode 100644 material_maker/theme/font_manager.gd.uid create mode 100644 material_maker/theme/fonts/system/system_bold_font.tres create mode 100644 material_maker/theme/fonts/system/system_code_font.tres create mode 100644 material_maker/theme/fonts/system/system_main_font.tres create mode 100644 material_maker/theme/fonts/system/system_medium_font.tres create mode 100644 material_maker/theme/fonts/ui/bold_font.tres create mode 100644 material_maker/theme/fonts/ui/classic_font.tres create mode 100644 material_maker/theme/fonts/ui/code_font.tres create mode 100644 material_maker/theme/fonts/ui/main_font.tres create mode 100644 material_maker/theme/fonts/ui/medium_font.tres create mode 100644 material_maker/windows/preferences/file_option.gd create mode 100644 material_maker/windows/preferences/file_option.gd.uid create mode 100644 material_maker/windows/preferences/file_option.tscn diff --git a/material_maker/globals.gd b/material_maker/globals.gd index 89c52d624..79168e1f1 100644 --- a/material_maker/globals.gd +++ b/material_maker/globals.gd @@ -60,6 +60,10 @@ const DEFAULT_CONFIG : Dictionary = { dialog_dim_background = true, node_minimize_button = false, node_close_button = false, + ui_use_system_font = false, + ui_font_size = 16, + ui_code_font_size = 12, + ui_font_enable_msdf = true } @@ -228,3 +232,6 @@ func get_node_title_from_gen(generator : MMGenBase) -> String: var gnode : GraphNode = graph.get_node(node_path) return gnode.title.to_snake_case() return "unnamed" + +func is_classic_theme() -> bool: + return "classic" in mm_globals.main_window.theme.resource_path diff --git a/material_maker/main_window.gd b/material_maker/main_window.gd index 48db5a475..4ab3b9c59 100644 --- a/material_maker/main_window.gd +++ b/material_maker/main_window.gd @@ -161,6 +161,11 @@ func _ready() -> void: if mm_globals.config.has_section_key("window", "size"): get_window().size = mm_globals.config.get_value("window", "size") + # Update fonts + FontManager.rebuild_fonts() + theme.default_font = FontManager.main_font + theme.default_font_size = FontManager.ui_font_size + # Restore the theme var theme_name: String = "default dark" if mm_globals.config.has_section_key("window", "theme"): @@ -620,14 +625,21 @@ func create_menu_set_theme(menu : MMMenuManager.MenuBase) -> void: func change_theme(theme_name) -> void: if not ResourceLoader.exists("res://material_maker/theme/"+theme_name+".tres"): theme_name = "default dark" - var _theme = load("res://material_maker/theme/"+theme_name+".tres") + var _theme : Theme = load("res://material_maker/theme/"+theme_name+".tres") if _theme == theme: return if _theme is EnhancedTheme: _theme.update() - await get_tree().process_frame theme = _theme + theme.default_font = FontManager.main_font + theme.set_font("title_font", "TooltipPanel", FontManager.main_font) + theme.set_font("font", "TooltipLabel", FontManager.main_font) + if "classic" in theme_name: + if not FontManager.has_font_config("main_font"): + theme.default_font = FontManager.classic_font + theme.set_font("title_font", "TooltipPanel", FontManager.classic_font) + theme.set_font("font", "TooltipLabel", FontManager.classic_font) RenderingServer.set_default_clear_color(Color(0.14, 0.17,0.23)) else: RenderingServer.set_default_clear_color( diff --git a/material_maker/nodes/base.gd b/material_maker/nodes/base.gd index 3c98d9bb2..d422c08c0 100644 --- a/material_maker/nodes/base.gd +++ b/material_maker/nodes/base.gd @@ -229,7 +229,7 @@ func _draw() -> void: draw_style_box(get_theme_stylebox("node_highlight"), Rect2(Vector2.ZERO, size)) if generator.rendering_time > 0: var time_color : Color = get_rendering_time_color(generator.rendering_time) - var buffer_timing_font : Font = preload("res://material_maker/theme/font_rubik/Rubik-416.ttf") + var buffer_timing_font : FontVariation = FontManager.medium_font @warning_ignore_start("narrowing_conversion") draw_string_outline(buffer_timing_font, Vector2i(0, size.y+12), str(generator.rendering_time)+"ms", HORIZONTAL_ALIGNMENT_CENTER, size.x, 12, 4, Color.BLACK) draw_string(buffer_timing_font, Vector2i(0, size.y+12), str(generator.rendering_time)+"ms", HORIZONTAL_ALIGNMENT_CENTER, size.x, 12, time_color) diff --git a/material_maker/nodes/generic/generic.gd b/material_maker/nodes/generic/generic.gd index 3d45cc546..c70544ad8 100644 --- a/material_maker/nodes/generic/generic.gd +++ b/material_maker/nodes/generic/generic.gd @@ -417,7 +417,7 @@ func do_update_preview() -> void: func update_title() -> void: title = TranslationServer.translate(generator.get_type_name()) if generator == null or generator.minimized: - var font : Font = get_theme_font("default_font") + var font : Font = FontManager.medium_font var max_title_width = 28 if font.get_string_size(title).x > max_title_width: for i in range(1, title.length()-1): @@ -438,6 +438,8 @@ func update_node() -> void: if mm_globals.get_config(SETTINGS_NODE_CLOSE_BUTTON) else false) # Rebuild node update_title() + var title_label : Label = get_titlebar_hbox().get_child(0) + title_label.add_theme_font_override("font", FontManager.medium_font) # Resize to minimum size = Vector2(0, 0) # Regex for labels diff --git a/material_maker/nodes/minimal.gd b/material_maker/nodes/minimal.gd index d26a2eca0..a633e6453 100644 --- a/material_maker/nodes/minimal.gd +++ b/material_maker/nodes/minimal.gd @@ -19,6 +19,8 @@ func _ready() -> void: buttons = HBoxContainer.new() var space : Control = Control.new() buttons.add_theme_constant_override("separation", 1) + var title_label : Label = get_titlebar_hbox().get_child(0) + title_label.add_theme_font_override("font", FontManager.medium_font) space.custom_minimum_size = Vector2(4, 0) buttons.add_child(space) get_titlebar_hbox().add_child(buttons) diff --git a/material_maker/nodes/portal/portal.gd b/material_maker/nodes/portal/portal.gd index 0116b2bfe..409fabeb4 100644 --- a/material_maker/nodes/portal/portal.gd +++ b/material_maker/nodes/portal/portal.gd @@ -1,7 +1,7 @@ extends MMGraphNodeMinimal class_name MMGraphPortal -const LABEL_FONT = preload("res://material_maker/theme/font_rubik/Rubik-416.ttf") +var label_font : FontVariation = FontManager.medium_font ## Whether portal's link is being edited ## (i.e. its associated LineEdit is visible) @@ -32,11 +32,11 @@ func _draw() -> void: var label_pos := size * 0.5 var label_color : Color = generator.color - var label_size = LABEL_FONT.get_string_size(get_link(), HORIZONTAL_ALIGNMENT_CENTER, -1, label_font_size) + var label_size = label_font.get_string_size(get_link(), HORIZONTAL_ALIGNMENT_CENTER, -1, label_font_size) var label_draw_pos := label_pos - Vector2(label_size.x * 0.5, label_y_offset) if not is_editing: - draw_string_outline(LABEL_FONT, label_draw_pos, get_link(), HORIZONTAL_ALIGNMENT_CENTER, -1, label_font_size, 5, Color.BLACK) - draw_string(LABEL_FONT, label_draw_pos, get_link(), HORIZONTAL_ALIGNMENT_CENTER, -1, label_font_size, label_color) + draw_string_outline(label_font, label_draw_pos, get_link(), HORIZONTAL_ALIGNMENT_CENTER, -1, label_font_size, 5, Color.BLACK) + draw_string(label_font, label_draw_pos, get_link(), HORIZONTAL_ALIGNMENT_CENTER, -1, label_font_size, label_color) # label dragger %Dragger.mouse_filter = MOUSE_FILTER_IGNORE if is_editing else MOUSE_FILTER_PASS @@ -274,7 +274,7 @@ func setup_portal_edit() -> void: var old_link := get_link() var graph : MMGraphEdit = get_parent() var edit := LineEdit.new() - edit.add_theme_font_override("font", LABEL_FONT) + edit.add_theme_font_override("font", label_font) edit.alignment = HORIZONTAL_ALIGNMENT_CENTER edit.max_length = 64 edit.expand_to_text_length = true diff --git a/material_maker/panels/graph_edit/graph_edit.gd b/material_maker/panels/graph_edit/graph_edit.gd index ee4079441..60404d105 100644 --- a/material_maker/panels/graph_edit/graph_edit.gd +++ b/material_maker/panels/graph_edit/graph_edit.gd @@ -69,7 +69,6 @@ signal graph_changed signal view_updated signal preview_changed - func _ready() -> void: OS.low_processor_usage_mode = true center_view() diff --git a/material_maker/panels/graph_edit/graph_zoom_menu.gd b/material_maker/panels/graph_edit/graph_zoom_menu.gd index 19fe28e59..3bc26ce8d 100644 --- a/material_maker/panels/graph_edit/graph_zoom_menu.gd +++ b/material_maker/panels/graph_edit/graph_zoom_menu.gd @@ -40,3 +40,7 @@ func update_zoom() -> void: if graph_edit: graph_edit.zoom = zoom_level mm_globals.set_config(SETTING_GRAPH_ZOOM_LEVEL, zoom_level) + +func _notification(what : int) -> void: + if what == NOTIFICATION_THEME_CHANGED: + %ZoomLabel.add_theme_font_override("font", FontManager.main_font) diff --git a/material_maker/panels/library/library.gd b/material_maker/panels/library/library.gd index df7fb98a8..db0912c2d 100644 --- a/material_maker/panels/library/library.gd +++ b/material_maker/panels/library/library.gd @@ -13,8 +13,6 @@ var category_buttons = {} @onready var filter_line_edit : LineEdit = %Filter @onready var item_menu : PopupMenu = %ItemMenu -var section_font = preload("res://material_maker/theme/font_rubik/Rubik-416.ttf") - const MINIMUM_ITEM_HEIGHT : int = 30 const MENU_CREATE_LIBRARY : int = 1000 @@ -68,8 +66,9 @@ func _notification(what: int) -> void: func update_theme() -> void: libraries_button.icon = get_theme_icon("settings", "MM_Icons") - var is_theme_classic : bool = "classic" in mm_globals.main_window.theme.resource_path + var is_theme_classic : bool = mm_globals.is_classic_theme() library_manager.update_section_colors(is_theme_classic) + update_tree() func init_expanded_items() -> void: var f = FileAccess.open("user://expanded_items.bin", FileAccess.READ) @@ -160,7 +159,7 @@ func update_tree() -> void: for section : TreeItem in tree.get_root().get_children(): if section.get_children().size(): - section.set_custom_font(0, section_font) + section.set_custom_font(0, FontManager.medium_font) tree.queue_redraw() func add_item(item, library_index : int, item_name : String, item_icon = null, item_parent = null, force_expand = false) -> TreeItem: diff --git a/material_maker/panels/preview_2d/export_menu.gd b/material_maker/panels/preview_2d/export_menu.gd index 5d4efb1f6..5ccffc2bb 100644 --- a/material_maker/panels/preview_2d/export_menu.gd +++ b/material_maker/panels/preview_2d/export_menu.gd @@ -24,6 +24,8 @@ func _notification(what: int) -> void: %ExportFolderButton.icon = get_theme_icon("folder", "MM_Icons") %ExportFileResultLabel.add_theme_color_override("font_color", get_theme_color("font_color", "Label").lerp(Color.ORANGE, 0.5)) %ExportNotificationLabel.add_theme_color_override("font_color", get_theme_color("font_color", "Label").lerp(get_theme_color("icon_pressed_color", "Button"), 0.5)) + %ExportFileResultLabel.add_theme_font_override("font", + FontManager.create_italic_variation(FontManager.main_font)) func _open() -> void: diff --git a/material_maker/panels/preview_3d/export_menu.gd b/material_maker/panels/preview_3d/export_menu.gd index 21d166116..3f33dfa64 100644 --- a/material_maker/panels/preview_3d/export_menu.gd +++ b/material_maker/panels/preview_3d/export_menu.gd @@ -100,3 +100,10 @@ func interpret_map_file_name(file_name: String, path:="") -> String: func _on_map_file_type_item_selected(_index: int) -> void: update_generate_map_file_label() + +func _notification(what: int) -> void: + if what == NOTIFICATION_THEME_CHANGED: + if not is_node_ready(): + await ready + MapExportFileResultLabel.add_theme_font_override("font", + FontManager.create_italic_variation(FontManager.main_font)) diff --git a/material_maker/theme/classic.tres b/material_maker/theme/classic.tres index ee3307336..c5c391144 100644 --- a/material_maker/theme/classic.tres +++ b/material_maker/theme/classic.tres @@ -1,4 +1,4 @@ -[gd_resource type="Theme" script_class="EnhancedTheme" load_steps=4 format=3 uid="uid://wuddtc1fglln"] +[gd_resource type="Theme" script_class="EnhancedTheme" format=3 uid="uid://wuddtc1fglln"] [ext_resource type="Theme" uid="uid://w487nirev8y5" path="res://material_maker/theme/classic_base.tres" id="1_meah8"] [ext_resource type="Script" uid="uid://3ga2k3abkk0d" path="res://material_maker/theme/enhanced_theme_system/color_swap.gd" id="5_qpu3p"] diff --git a/material_maker/theme/default dark.tres b/material_maker/theme/default dark.tres index ab33d0ff5..03686c240 100644 --- a/material_maker/theme/default dark.tres +++ b/material_maker/theme/default dark.tres @@ -1,4 +1,4 @@ -[gd_resource type="Theme" script_class="EnhancedTheme" load_steps=42 format=3 uid="uid://dhuhq2immquoh"] +[gd_resource type="Theme" script_class="EnhancedTheme" format=3 uid="uid://dhuhq2immquoh"] [ext_resource type="Theme" uid="uid://b628lwfk6ig2c" path="res://material_maker/theme/default.tres" id="3_xjelh"] [ext_resource type="Script" uid="uid://3ga2k3abkk0d" path="res://material_maker/theme/enhanced_theme_system/color_swap.gd" id="4_0efyb"] diff --git a/material_maker/theme/default.tres b/material_maker/theme/default.tres index f19d6072b..f6121e343 100644 --- a/material_maker/theme/default.tres +++ b/material_maker/theme/default.tres @@ -1277,8 +1277,8 @@ GraphNode/styles/titlebar = SubResource("StyleBoxFlat_imqse") GraphNode/styles/titlebar_selected = SubResource("StyleBoxFlat_ru0kh") GraphNodeTitleLabel/colors/font_outline_color = Color(0.168627, 0.176471, 0.192157, 1) GraphNodeTitleLabel/colors/font_shadow_color = Color(0.168627, 0.176471, 0.192157, 1) -GraphNodeTitleLabel/constants/outline_size = 5 -GraphNodeTitleLabel/constants/shadow_outline_size = 6 +GraphNodeTitleLabel/constants/outline_size = 6 +GraphNodeTitleLabel/constants/shadow_outline_size = 7 GraphNodeTitleLabel/fonts/font = ExtResource("2_5e0gw") HScrollBar/styles/grabber = SubResource("StyleBoxFlat_fs6qc") HScrollBar/styles/grabber_highlight = SubResource("StyleBoxFlat_70aex") @@ -1526,6 +1526,8 @@ TabContainer/styles/tab_selected = SubResource("StyleBoxFlat_ld0tj") TabContainer/styles/tab_unselected = SubResource("StyleBoxFlat_e07v0") TextEdit/styles/focus = SubResource("StyleBoxEmpty_asgc8") TooltipLabel/font_sizes/font_size = 15 +TooltipLabel/fonts/font = ExtResource("1_5tfb1") +TooltipPanel/fonts/title_font = ExtResource("1_5tfb1") TooltipPanel/styles/panel = SubResource("StyleBoxFlat_5rnro") Tree/colors/font_color = Color(0.7, 0.7, 0.7, 1) Tree/colors/font_disabled_color = Color(0.875, 0.875, 0.875, 0.5) diff --git a/material_maker/theme/font_manager.gd b/material_maker/theme/font_manager.gd new file mode 100644 index 000000000..db66d8e3a --- /dev/null +++ b/material_maker/theme/font_manager.gd @@ -0,0 +1,79 @@ +class_name FontManager +extends RefCounted + +static var main_font : FontVariation = preload("res://material_maker/theme/fonts/ui/main_font.tres") +static var medium_font : FontVariation = preload("res://material_maker/theme/fonts/ui/medium_font.tres") +static var bold_font : FontVariation = preload("res://material_maker/theme/fonts/ui/bold_font.tres") +static var code_font : FontVariation = preload("res://material_maker/theme/fonts/ui/code_font.tres") + +static var classic_font : FontVariation = preload("res://material_maker/theme/fonts/ui/classic_font.tres") + +static var ui_font_size : int +static var ui_code_font_size : int + +const SETTINGS_UI_FONT_SIZE : String = "ui_font_size" +const SETTINGS_UI_CODE_FONT_SIZE : String = "ui_code_font_size" +const SETTINGS_UI_USE_SYSTEM_FONT : String = "ui_use_system_font" + +static func create_italic_variation(font : FontVariation) -> FontVariation: + var f : FontVariation = font.duplicate() + f.variation_transform = Transform2D( + Vector2(1.0, 0.22), Vector2(0.0, 1.0), Vector2.ZERO) + return f + +static func has_font_config(config : String) -> bool: + return (mm_globals.has_config(config) + and not mm_globals.get_config(config).is_empty()) + +static func setup_rendering(font : FontVariation) -> void: + if mm_globals.get_config("ui_font_enable_msdf"): + font.base_font.msdf_pixel_range = 32 + font.base_font.msdf_size = 48 + font.base_font.multichannel_signed_distance_field = true + else: + font.base_font.multichannel_signed_distance_field = false + +static func rebuild_fonts() -> void: + if mm_globals.has_config(SETTINGS_UI_FONT_SIZE): + ui_font_size = mm_globals.get_config(SETTINGS_UI_FONT_SIZE) + + if mm_globals.has_config(SETTINGS_UI_CODE_FONT_SIZE): + ui_code_font_size = mm_globals.get_config(SETTINGS_UI_CODE_FONT_SIZE) + + if mm_globals.get_config(SETTINGS_UI_USE_SYSTEM_FONT): + main_font = preload("res://material_maker/theme/fonts/system/system_main_font.tres") + medium_font = preload("res://material_maker/theme/fonts/system/system_medium_font.tres") + bold_font = preload("res://material_maker/theme/fonts/system/system_bold_font.tres") + code_font = preload("res://material_maker/theme/fonts/system/system_code_font.tres") + + var config : Dictionary[FontVariation, Dictionary] = { + main_font : { "weight": 400, "name": "Segoe UI" }, + medium_font : { "weight": 600, "name": "Segoe UI" }, + bold_font : { "weight": 800, "name": "Segoe UI" }, + code_font : { "weight": 400, "name": "Consolas" } + } + + for font_var : FontVariation in config: + var cfg : Dictionary = config[font_var] + if OS.get_name() == "Windows": + font_var.base_font = SystemFont.new() + font_var.base_font.font_names.append(cfg.name) + font_var.base_font.font_weight = cfg.weight + setup_rendering(font_var) + return + + var fonts : Dictionary[String, FontVariation] = { + "main_font": main_font, + "medium_font": medium_font, + "bold_font": bold_font, + "code_font": code_font + } + + for font : String in fonts: + var font_variation : FontVariation = fonts[font] + if has_font_config(font): + font_variation.base_font = FontFile.new() + font_variation.base_font.load_dynamic_font(mm_globals.get_config(font)) + else: + font_variation.base_font = load(font_variation.fallbacks[0].resource_path) + setup_rendering(font_variation) diff --git a/material_maker/theme/font_manager.gd.uid b/material_maker/theme/font_manager.gd.uid new file mode 100644 index 000000000..bbfe459b2 --- /dev/null +++ b/material_maker/theme/font_manager.gd.uid @@ -0,0 +1 @@ +uid://c50net8nr1iig diff --git a/material_maker/theme/fonts/system/system_bold_font.tres b/material_maker/theme/fonts/system/system_bold_font.tres new file mode 100644 index 000000000..0ee605336 --- /dev/null +++ b/material_maker/theme/fonts/system/system_bold_font.tres @@ -0,0 +1,14 @@ +[gd_resource type="FontVariation" format=3 uid="uid://ch4d2bwcn5a"] + +[ext_resource type="FontFile" uid="uid://btybkvkb8rtol" path="res://material_maker/fonts/DroidSansFallback.ttf" id="1_ub2cf"] +[ext_resource type="FontFile" uid="uid://buwvapsuukd0n" path="res://material_maker/fonts/DroidSansJapanese.ttf" id="2_ml3ku"] + +[sub_resource type="SystemFont" id="SystemFont_ouejq"] +font_names = PackedStringArray("Sans-Serif") +font_weight = 800 +multichannel_signed_distance_field = true +msdf_pixel_range = 32 + +[resource] +fallbacks = Array[Font]([ExtResource("1_ub2cf"), ExtResource("2_ml3ku")]) +base_font = SubResource("SystemFont_ouejq") diff --git a/material_maker/theme/fonts/system/system_code_font.tres b/material_maker/theme/fonts/system/system_code_font.tres new file mode 100644 index 000000000..9f7795d14 --- /dev/null +++ b/material_maker/theme/fonts/system/system_code_font.tres @@ -0,0 +1,13 @@ +[gd_resource type="FontVariation" format=3 uid="uid://dhfia0y843i1y"] + +[ext_resource type="FontFile" uid="uid://btybkvkb8rtol" path="res://material_maker/fonts/DroidSansFallback.ttf" id="1_tb5d5"] +[ext_resource type="FontFile" uid="uid://buwvapsuukd0n" path="res://material_maker/fonts/DroidSansJapanese.ttf" id="2_qhq60"] + +[sub_resource type="SystemFont" id="SystemFont_ouejq"] +font_names = PackedStringArray("Monospace") +multichannel_signed_distance_field = true +msdf_pixel_range = 32 + +[resource] +fallbacks = Array[Font]([ExtResource("1_tb5d5"), ExtResource("2_qhq60")]) +base_font = SubResource("SystemFont_ouejq") diff --git a/material_maker/theme/fonts/system/system_main_font.tres b/material_maker/theme/fonts/system/system_main_font.tres new file mode 100644 index 000000000..693bcc095 --- /dev/null +++ b/material_maker/theme/fonts/system/system_main_font.tres @@ -0,0 +1,13 @@ +[gd_resource type="FontVariation" format=3 uid="uid://bke5ujsr368cv"] + +[ext_resource type="FontFile" uid="uid://btybkvkb8rtol" path="res://material_maker/fonts/DroidSansFallback.ttf" id="1_dcm08"] +[ext_resource type="FontFile" uid="uid://buwvapsuukd0n" path="res://material_maker/fonts/DroidSansJapanese.ttf" id="2_dulnh"] + +[sub_resource type="SystemFont" id="SystemFont_ouejq"] +font_names = PackedStringArray("Sans-Serif") +multichannel_signed_distance_field = true +msdf_pixel_range = 32 + +[resource] +fallbacks = Array[Font]([ExtResource("1_dcm08"), ExtResource("2_dulnh")]) +base_font = SubResource("SystemFont_ouejq") diff --git a/material_maker/theme/fonts/system/system_medium_font.tres b/material_maker/theme/fonts/system/system_medium_font.tres new file mode 100644 index 000000000..28ce67581 --- /dev/null +++ b/material_maker/theme/fonts/system/system_medium_font.tres @@ -0,0 +1,14 @@ +[gd_resource type="FontVariation" format=3 uid="uid://6k785eldqigf"] + +[ext_resource type="FontFile" uid="uid://btybkvkb8rtol" path="res://material_maker/fonts/DroidSansFallback.ttf" id="1_qyurx"] +[ext_resource type="FontFile" uid="uid://buwvapsuukd0n" path="res://material_maker/fonts/DroidSansJapanese.ttf" id="2_wh3pl"] + +[sub_resource type="SystemFont" id="SystemFont_ouejq"] +font_names = PackedStringArray("Sans-Serif") +font_weight = 600 +multichannel_signed_distance_field = true +msdf_pixel_range = 32 + +[resource] +fallbacks = Array[Font]([ExtResource("1_qyurx"), ExtResource("2_wh3pl")]) +base_font = SubResource("SystemFont_ouejq") diff --git a/material_maker/theme/fonts/ui/bold_font.tres b/material_maker/theme/fonts/ui/bold_font.tres new file mode 100644 index 000000000..f5c15a74d --- /dev/null +++ b/material_maker/theme/fonts/ui/bold_font.tres @@ -0,0 +1,8 @@ +[gd_resource type="FontVariation" format=3 uid="uid://cfoeywyltjuo2"] + +[ext_resource type="FontFile" uid="uid://dq4ssdyyfotag" path="res://material_maker/theme/font_rubik/Rubik-Bold.ttf" id="1_v3ac0"] +[ext_resource type="FontFile" uid="uid://btybkvkb8rtol" path="res://material_maker/fonts/DroidSansFallback.ttf" id="2_bhm15"] +[ext_resource type="FontFile" uid="uid://buwvapsuukd0n" path="res://material_maker/fonts/DroidSansJapanese.ttf" id="3_bhm15"] + +[resource] +fallbacks = Array[Font]([ExtResource("1_v3ac0"), ExtResource("2_bhm15"), ExtResource("3_bhm15")]) diff --git a/material_maker/theme/fonts/ui/classic_font.tres b/material_maker/theme/fonts/ui/classic_font.tres new file mode 100644 index 000000000..333c5f18a --- /dev/null +++ b/material_maker/theme/fonts/ui/classic_font.tres @@ -0,0 +1,7 @@ +[gd_resource type="FontVariation" format=3 uid="uid://cukrxt4w03iac"] + +[ext_resource type="FontFile" uid="uid://btybkvkb8rtol" path="res://material_maker/fonts/DroidSansFallback.ttf" id="2_em5my"] + +[resource] +fallbacks = Array[Font]([ExtResource("2_em5my")]) +base_font = ExtResource("2_em5my") diff --git a/material_maker/theme/fonts/ui/code_font.tres b/material_maker/theme/fonts/ui/code_font.tres new file mode 100644 index 000000000..98eee92b0 --- /dev/null +++ b/material_maker/theme/fonts/ui/code_font.tres @@ -0,0 +1,8 @@ +[gd_resource type="FontVariation" format=3 uid="uid://cjc2c8qp5r5x0"] + +[ext_resource type="FontFile" uid="uid://c4vhxy5kgdp8s" path="res://material_maker/fonts/hack.ttf" id="1_w2v43"] +[ext_resource type="FontFile" uid="uid://btybkvkb8rtol" path="res://material_maker/fonts/DroidSansFallback.ttf" id="2_nv7dv"] +[ext_resource type="FontFile" uid="uid://buwvapsuukd0n" path="res://material_maker/fonts/DroidSansJapanese.ttf" id="3_nv7dv"] + +[resource] +fallbacks = Array[Font]([ExtResource("1_w2v43"), ExtResource("2_nv7dv"), ExtResource("3_nv7dv")]) diff --git a/material_maker/theme/fonts/ui/main_font.tres b/material_maker/theme/fonts/ui/main_font.tres new file mode 100644 index 000000000..6a0014355 --- /dev/null +++ b/material_maker/theme/fonts/ui/main_font.tres @@ -0,0 +1,8 @@ +[gd_resource type="FontVariation" format=3 uid="uid://b3d8p401jppew"] + +[ext_resource type="FontFile" uid="uid://lro0qdrhfytt" path="res://material_maker/theme/font_rubik/Rubik-Light.ttf" id="1_c62ru"] +[ext_resource type="FontFile" uid="uid://btybkvkb8rtol" path="res://material_maker/fonts/DroidSansFallback.ttf" id="2_waneu"] +[ext_resource type="FontFile" uid="uid://buwvapsuukd0n" path="res://material_maker/fonts/DroidSansJapanese.ttf" id="3_waneu"] + +[resource] +fallbacks = Array[Font]([ExtResource("1_c62ru"), ExtResource("2_waneu"), ExtResource("3_waneu")]) diff --git a/material_maker/theme/fonts/ui/medium_font.tres b/material_maker/theme/fonts/ui/medium_font.tres new file mode 100644 index 000000000..9e8327b28 --- /dev/null +++ b/material_maker/theme/fonts/ui/medium_font.tres @@ -0,0 +1,8 @@ +[gd_resource type="FontVariation" format=3 uid="uid://clmqa2fxntpp4"] + +[ext_resource type="FontFile" uid="uid://bn648prik7soq" path="res://material_maker/theme/font_rubik/Rubik-416.ttf" id="1_22i4t"] +[ext_resource type="FontFile" uid="uid://btybkvkb8rtol" path="res://material_maker/fonts/DroidSansFallback.ttf" id="2_k8ftl"] +[ext_resource type="FontFile" uid="uid://buwvapsuukd0n" path="res://material_maker/fonts/DroidSansJapanese.ttf" id="3_k8ftl"] + +[resource] +fallbacks = Array[Font]([ExtResource("1_22i4t"), ExtResource("2_k8ftl"), ExtResource("3_k8ftl")]) diff --git a/material_maker/widgets/code_editor/code_editor.gd b/material_maker/widgets/code_editor/code_editor.gd index f7beca207..dfb8b47d7 100644 --- a/material_maker/widgets/code_editor/code_editor.gd +++ b/material_maker/widgets/code_editor/code_editor.gd @@ -27,6 +27,10 @@ func _context_menu_about_to_popup() -> void: get_menu().position = get_window().position + Vector2i( get_global_mouse_position() * content_scale_factor) +func _init() -> void: + add_theme_font_override("font", FontManager.code_font) + add_theme_font_size_override("font_size", FontManager.ui_code_font_size) + func _ready(): if not get_menu().about_to_popup.is_connected(_context_menu_about_to_popup): get_menu().about_to_popup.connect(_context_menu_about_to_popup) diff --git a/material_maker/widgets/float_edit/float_edit.gd b/material_maker/widgets/float_edit/float_edit.gd index 12fd1ee2b..0099e6fc6 100644 --- a/material_maker/widgets/float_edit/float_edit.gd +++ b/material_maker/widgets/float_edit/float_edit.gd @@ -300,6 +300,8 @@ func update() -> void: $Edit.add_theme_color_override("font_uneditable_color", get_theme_color("font_color")) else: $Edit.remove_theme_color_override("font_uneditable_color") + $Edit.add_theme_font_size_override("font_size", FontManager.ui_font_size) + $Edit.add_theme_font_override("font", FontManager.main_font) $Edit.queue_redraw() diff --git a/material_maker/widgets/render_counter/render_counter.tscn b/material_maker/widgets/render_counter/render_counter.tscn index b0814e9d2..5f1c2d440 100644 --- a/material_maker/widgets/render_counter/render_counter.tscn +++ b/material_maker/widgets/render_counter/render_counter.tscn @@ -1,20 +1,20 @@ -[gd_scene load_steps=2 format=3 uid="uid://cp2mbbfmrv6sf"] +[gd_scene format=3 uid="uid://cp2mbbfmrv6sf"] [ext_resource type="Script" uid="uid://4ajg6j8vvfvo" path="res://material_maker/widgets/render_counter/render_counter.gd" id="1"] -[node name="RenderCounter" type="HBoxContainer" groups=["render_counter"]] +[node name="RenderCounter" type="HBoxContainer" unique_id=1940508034 groups=["render_counter"]] offset_right = 158.0 offset_bottom = 20.0 script = ExtResource("1") -[node name="FpsCounter" type="Label" parent="."] +[node name="FpsCounter" type="Label" parent="." unique_id=922092972] layout_mode = 2 -[node name="GpuRam" type="Label" parent="."] +[node name="GpuRam" type="Label" parent="." unique_id=1035058117] layout_mode = 2 mouse_filter = 0 -[node name="ProgressBar" type="ProgressBar" parent="."] +[node name="ProgressBar" type="ProgressBar" parent="." unique_id=78993355] custom_minimum_size = Vector2(150, 0) layout_mode = 2 size_flags_vertical = 1 @@ -23,22 +23,22 @@ max_value = 1.0 value = 1.0 show_percentage = false -[node name="Label" type="Label" parent="ProgressBar"] +[node name="Label" type="Label" parent="ProgressBar" unique_id=1917845541] layout_mode = 0 anchor_right = 1.0 anchor_bottom = 1.0 horizontal_alignment = 1 vertical_alignment = 1 -[node name="PopupMenu" type="PopupMenu" parent="."] +[node name="PopupMenu" type="PopupMenu" parent="." unique_id=2108864684] -[node name="Renderers" type="PopupMenu" parent="PopupMenu"] +[node name="Renderers" type="PopupMenu" parent="PopupMenu" unique_id=1498076011] -[node name="MaxRenderSize" type="PopupMenu" parent="PopupMenu"] +[node name="MaxRenderSize" type="PopupMenu" parent="PopupMenu" unique_id=1841504785] -[node name="MaxBufferSize" type="PopupMenu" parent="PopupMenu"] +[node name="MaxBufferSize" type="PopupMenu" parent="PopupMenu" unique_id=959145863] -[node name="MemUpdateTimer" type="Timer" parent="."] +[node name="MemUpdateTimer" type="Timer" parent="." unique_id=1092211168] autostart = true [connection signal="gui_input" from="." to="." method="_on_RenderCounter_gui_input"] diff --git a/material_maker/widgets/splines_edit/splines_editor.gd b/material_maker/widgets/splines_edit/splines_editor.gd index 48d557ebb..a58c515cd 100644 --- a/material_maker/widgets/splines_edit/splines_editor.gd +++ b/material_maker/widgets/splines_edit/splines_editor.gd @@ -17,7 +17,7 @@ var mode : Modes = Modes.DRAW var progressive : bool = false -var spline_font = preload("res://material_maker/theme/font_rubik/Rubik-Bold.ttf") +var spline_font : FontVariation = FontManager.bold_font var font_size = 16 var text_bg_width = 12 diff --git a/material_maker/windows/add_node_popup/quick_button.tscn b/material_maker/windows/add_node_popup/quick_button.tscn index cad55fb9a..a59ef0729 100644 --- a/material_maker/windows/add_node_popup/quick_button.tscn +++ b/material_maker/windows/add_node_popup/quick_button.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=5 format=3 uid="uid://cjcxjmoki7j0n"] +[gd_scene format=3 uid="uid://cjcxjmoki7j0n"] [ext_resource type="Script" uid="uid://dgye466wiylhc" path="res://material_maker/windows/add_node_popup/quick_button.gd" id="1"] @@ -26,7 +26,7 @@ shader_parameter/disabled = false shader_parameter/brightness = 0.8 shader_parameter/tex = SubResource("PlaceholderTexture2D_4pf3v") -[node name="QuickButton" type="ColorRect"] +[node name="QuickButton" type="ColorRect" unique_id=875710738] material = SubResource("12") custom_minimum_size = Vector2(24, 24) offset_right = 24.0 diff --git a/material_maker/windows/material_editor/export_editor.gd b/material_maker/windows/material_editor/export_editor.gd index 8dd1f30a8..49eaf4634 100644 --- a/material_maker/windows/material_editor/export_editor.gd +++ b/material_maker/windows/material_editor/export_editor.gd @@ -373,6 +373,8 @@ func _on_Cancel_pressed() -> void: func _notification(what: int) -> void: match what: NOTIFICATION_THEME_CHANGED: + %"Custom Script".add_theme_font_override("font", FontManager.code_font) + %"Custom Script".add_theme_font_size_override("font_size", FontManager.ui_code_font_size) var theme_path : String = mm_globals.main_window.theme.resource_path if "dark" in theme_path: $BG.color = Color("0b0b0c") diff --git a/material_maker/windows/material_editor/export_editor.tscn b/material_maker/windows/material_editor/export_editor.tscn index 5bd2df39a..cadc1eb0b 100644 --- a/material_maker/windows/material_editor/export_editor.tscn +++ b/material_maker/windows/material_editor/export_editor.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=11 format=3 uid="uid://cwjtvrgb2al2x"] +[gd_scene format=3 uid="uid://cwjtvrgb2al2x"] [ext_resource type="Script" uid="uid://bp8x8ej3d6k4e" path="res://material_maker/windows/material_editor/export_editor.gd" id="2"] [ext_resource type="PackedScene" uid="uid://lt2wnsnw4af6" path="res://material_maker/windows/material_editor/expression_line_edit.tscn" id="3"] @@ -32,13 +32,13 @@ region = Rect2(48, 160, 16, 16) atlas = ExtResource("3_ko8a7") region = Rect2(32, 0, 16, 16) -[node name="ExportEditor" type="Window"] +[node name="ExportEditor" type="Window" unique_id=1248551394] oversampling_override = 1.0 title = "Material Export Editor" position = Vector2i(0, 36) script = ExtResource("2") -[node name="BG" type="ColorRect" parent="."] +[node name="BG" type="ColorRect" parent="." unique_id=463054672] anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 @@ -46,136 +46,136 @@ grow_horizontal = 2 grow_vertical = 2 color = Color(0.043137256, 0.043137256, 0.047058824, 1) -[node name="MarginContainer" type="MarginContainer" parent="."] +[node name="MarginContainer" type="MarginContainer" parent="." unique_id=1792451751] anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 -[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"] +[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer" unique_id=1938598126] layout_mode = 2 size_flags_horizontal = 3 size_flags_vertical = 3 -[node name="Export" type="HBoxContainer" parent="MarginContainer/VBoxContainer"] +[node name="Export" type="HBoxContainer" parent="MarginContainer/VBoxContainer" unique_id=829497445] layout_mode = 2 -[node name="Create" type="Button" parent="MarginContainer/VBoxContainer/Export"] +[node name="Create" type="Button" parent="MarginContainer/VBoxContainer/Export" unique_id=898845045] layout_mode = 2 tooltip_text = "New export target" icon = SubResource("2") -[node name="Load" type="Button" parent="MarginContainer/VBoxContainer/Export"] +[node name="Load" type="Button" parent="MarginContainer/VBoxContainer/Export" unique_id=1738925097] layout_mode = 2 tooltip_text = "Load export target from file" icon = SubResource("9") -[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/Export"] +[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/Export" unique_id=1535933349] layout_mode = 2 text = "Export target:" -[node name="Option" type="OptionButton" parent="MarginContainer/VBoxContainer/Export"] +[node name="Option" type="OptionButton" parent="MarginContainer/VBoxContainer/Export" unique_id=66083129] custom_minimum_size = Vector2(150, 0) layout_mode = 2 size_flags_vertical = 4 -[node name="Rename" type="Button" parent="MarginContainer/VBoxContainer/Export"] +[node name="Rename" type="Button" parent="MarginContainer/VBoxContainer/Export" unique_id=1954936805] layout_mode = 2 tooltip_text = "Rename export target" icon = SubResource("3") -[node name="External" type="Button" parent="MarginContainer/VBoxContainer/Export"] +[node name="External" type="Button" parent="MarginContainer/VBoxContainer/Export" unique_id=1952860554] layout_mode = 2 tooltip_text = "Store as separate file" toggle_mode = true icon = SubResource("7") -[node name="Save" type="Button" parent="MarginContainer/VBoxContainer/Export"] +[node name="Save" type="Button" parent="MarginContainer/VBoxContainer/Export" unique_id=1430866122] layout_mode = 2 tooltip_text = "Save to file" icon = SubResource("8") -[node name="VSeparator" type="VSeparator" parent="MarginContainer/VBoxContainer/Export"] +[node name="VSeparator" type="VSeparator" parent="MarginContainer/VBoxContainer/Export" unique_id=1982626021] layout_mode = 2 -[node name="Duplicate" type="Button" parent="MarginContainer/VBoxContainer/Export"] +[node name="Duplicate" type="Button" parent="MarginContainer/VBoxContainer/Export" unique_id=100619087] layout_mode = 2 tooltip_text = "Duplicate export target" icon = SubResource("4") -[node name="Delete" type="Button" parent="MarginContainer/VBoxContainer/Export"] +[node name="Delete" type="Button" parent="MarginContainer/VBoxContainer/Export" unique_id=1854831832] layout_mode = 2 tooltip_text = "Delete export target" icon = SubResource("5") -[node name="Space" type="Control" parent="MarginContainer/VBoxContainer/Export"] +[node name="Space" type="Control" parent="MarginContainer/VBoxContainer/Export" unique_id=537854734] custom_minimum_size = Vector2(20, 0) layout_mode = 2 -[node name="ExtensionLabel" type="Label" parent="MarginContainer/VBoxContainer/Export"] +[node name="ExtensionLabel" type="Label" parent="MarginContainer/VBoxContainer/Export" unique_id=1160537666] layout_mode = 2 text = "Main file extension:" -[node name="ExtensionEdit" type="LineEdit" parent="MarginContainer/VBoxContainer/Export"] +[node name="ExtensionEdit" type="LineEdit" parent="MarginContainer/VBoxContainer/Export" unique_id=2042004532] layout_mode = 2 size_flags_vertical = 4 -[node name="HSeparator" type="HSeparator" parent="MarginContainer/VBoxContainer"] +[node name="HSeparator" type="HSeparator" parent="MarginContainer/VBoxContainer" unique_id=324978479] layout_mode = 2 -[node name="TabBar" type="TabContainer" parent="MarginContainer/VBoxContainer"] +[node name="TabBar" type="TabContainer" parent="MarginContainer/VBoxContainer" unique_id=166731076] layout_mode = 2 size_flags_horizontal = 3 size_flags_vertical = 3 current_tab = 0 -[node name="Files" type="HBoxContainer" parent="MarginContainer/VBoxContainer/TabBar"] +[node name="Files" type="HBoxContainer" parent="MarginContainer/VBoxContainer/TabBar" unique_id=483588346] layout_mode = 2 size_flags_horizontal = 3 size_flags_vertical = 3 metadata/_tab_index = 0 -[node name="Files" type="ItemList" parent="MarginContainer/VBoxContainer/TabBar/Files"] +[node name="Files" type="ItemList" parent="MarginContainer/VBoxContainer/TabBar/Files" unique_id=342963388] custom_minimum_size = Vector2(200, 0) layout_mode = 2 size_flags_vertical = 3 -[node name="File" type="VBoxContainer" parent="MarginContainer/VBoxContainer/TabBar/Files"] +[node name="File" type="VBoxContainer" parent="MarginContainer/VBoxContainer/TabBar/Files" unique_id=1233607205] layout_mode = 2 size_flags_horizontal = 3 size_flags_vertical = 3 -[node name="Common" type="GridContainer" parent="MarginContainer/VBoxContainer/TabBar/Files/File"] +[node name="Common" type="GridContainer" parent="MarginContainer/VBoxContainer/TabBar/Files/File" unique_id=803965978] layout_mode = 2 columns = 2 -[node name="LabelName" type="Label" parent="MarginContainer/VBoxContainer/TabBar/Files/File/Common"] +[node name="LabelName" type="Label" parent="MarginContainer/VBoxContainer/TabBar/Files/File/Common" unique_id=322197631] layout_mode = 2 text = "Name:" -[node name="name" type="LineEdit" parent="MarginContainer/VBoxContainer/TabBar/Files/File/Common"] +[node name="name" type="LineEdit" parent="MarginContainer/VBoxContainer/TabBar/Files/File/Common" unique_id=1833533613] layout_mode = 2 size_flags_horizontal = 3 -[node name="LabelPromptOverwrite" type="Label" parent="MarginContainer/VBoxContainer/TabBar/Files/File/Common"] +[node name="LabelPromptOverwrite" type="Label" parent="MarginContainer/VBoxContainer/TabBar/Files/File/Common" unique_id=2000927412] layout_mode = 2 text = "Prompt overwrite:" -[node name="prompt_overwrite" type="CheckBox" parent="MarginContainer/VBoxContainer/TabBar/Files/File/Common"] +[node name="prompt_overwrite" type="CheckBox" parent="MarginContainer/VBoxContainer/TabBar/Files/File/Common" unique_id=531782036] layout_mode = 2 -[node name="LabelCondition" type="Label" parent="MarginContainer/VBoxContainer/TabBar/Files/File/Common"] +[node name="LabelCondition" type="Label" parent="MarginContainer/VBoxContainer/TabBar/Files/File/Common" unique_id=1004793950] layout_mode = 2 text = "Condition:" -[node name="conditions" type="LineEdit" parent="MarginContainer/VBoxContainer/TabBar/Files/File/Common"] +[node name="conditions" type="LineEdit" parent="MarginContainer/VBoxContainer/TabBar/Files/File/Common" unique_id=1269909520] layout_mode = 2 size_flags_horizontal = 3 -[node name="LabelType" type="Label" parent="MarginContainer/VBoxContainer/TabBar/Files/File/Common"] +[node name="LabelType" type="Label" parent="MarginContainer/VBoxContainer/TabBar/Files/File/Common" unique_id=1428847088] layout_mode = 2 text = "Type:" -[node name="type" type="OptionButton" parent="MarginContainer/VBoxContainer/TabBar/Files/File/Common"] +[node name="type" type="OptionButton" parent="MarginContainer/VBoxContainer/TabBar/Files/File/Common" unique_id=1906344066] layout_mode = 2 size_flags_horizontal = 3 item_count = 4 @@ -188,21 +188,22 @@ popup/item_2/id = 2 popup/item_3/text = "Buffer templates" popup/item_3/id = 3 -[node name="LabelExpression" type="Label" parent="MarginContainer/VBoxContainer/TabBar/Files/File/Common"] +[node name="LabelExpression" type="Label" parent="MarginContainer/VBoxContainer/TabBar/Files/File/Common" unique_id=895010146] layout_mode = 2 text = "Output:" -[node name="expression" parent="MarginContainer/VBoxContainer/TabBar/Files/File/Common" instance=ExtResource("3")] +[node name="expression" parent="MarginContainer/VBoxContainer/TabBar/Files/File/Common" unique_id=1234300185 instance=ExtResource("3")] layout_mode = 2 -[node name="template" type="TextEdit" parent="MarginContainer/VBoxContainer/TabBar/Files/File"] +[node name="template" type="TextEdit" parent="MarginContainer/VBoxContainer/TabBar/Files/File" unique_id=130890460] custom_minimum_size = Vector2(100, 200) layout_mode = 2 size_flags_horizontal = 3 size_flags_vertical = 3 mouse_default_cursor_shape = 0 -[node name="Custom Script" type="TextEdit" parent="MarginContainer/VBoxContainer/TabBar"] +[node name="Custom Script" type="TextEdit" parent="MarginContainer/VBoxContainer/TabBar" unique_id=528706883] +unique_name_in_owner = true visible = false custom_minimum_size = Vector2(100, 200) layout_mode = 2 @@ -211,21 +212,21 @@ size_flags_vertical = 3 mouse_default_cursor_shape = 0 metadata/_tab_index = 1 -[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer"] +[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer" unique_id=874412941] layout_mode = 2 size_flags_horizontal = 4 -[node name="Apply" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer"] +[node name="Apply" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer" unique_id=651896979] custom_minimum_size = Vector2(70, 0) layout_mode = 2 text = "Apply" -[node name="OK" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer"] +[node name="OK" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer" unique_id=267351230] custom_minimum_size = Vector2(70, 0) layout_mode = 2 text = "OK" -[node name="Cancel" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer"] +[node name="Cancel" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer" unique_id=1960377214] custom_minimum_size = Vector2(70, 0) layout_mode = 2 text = "Cancel" diff --git a/material_maker/windows/preferences/file_option.gd b/material_maker/windows/preferences/file_option.gd new file mode 100644 index 000000000..376df8d43 --- /dev/null +++ b/material_maker/windows/preferences/file_option.gd @@ -0,0 +1,30 @@ +class_name FileOption +extends HBoxContainer + +@export var config_variable : String +@export var file_picker_filters : PackedStringArray + +func _ready() -> void: + for f in file_picker_filters: + $FilePickerButton.add_filter(f) + $FilePickerButton.tooltip_text = tooltip_text + +func init_from_config(config : ConfigFile) -> void: + if config.has_section_key("config", config_variable): + $FilePickerButton.path = config.get_value("config", config_variable) + set_reset_button() + +func update_config(config : ConfigFile) -> void: + config.set_value("config", config_variable, $FilePickerButton.path) + +func _on_reset_pressed() -> void: + $FilePickerButton.path = "" + set_reset_button() + +func set_reset_button() -> void: + $Reset.disabled = $FilePickerButton.path == "" + if $FilePickerButton.path == "": + $FilePickerButton.text = "Default" + +func _on_file_picker_button_file_selected(_f : Variant) -> void: + set_reset_button() diff --git a/material_maker/windows/preferences/file_option.gd.uid b/material_maker/windows/preferences/file_option.gd.uid new file mode 100644 index 000000000..ae398e14f --- /dev/null +++ b/material_maker/windows/preferences/file_option.gd.uid @@ -0,0 +1 @@ +uid://bv04peqautr3c diff --git a/material_maker/windows/preferences/file_option.tscn b/material_maker/windows/preferences/file_option.tscn new file mode 100644 index 000000000..dbeb5f2bc --- /dev/null +++ b/material_maker/windows/preferences/file_option.tscn @@ -0,0 +1,31 @@ +[gd_scene format=3 uid="uid://b7ko0gpbs5mqa"] + +[ext_resource type="Script" uid="uid://bv04peqautr3c" path="res://material_maker/windows/preferences/file_option.gd" id="1_3nbpc"] +[ext_resource type="PackedScene" uid="uid://cfyio0a1b27t0" path="res://material_maker/widgets/file_picker_button/file_picker_button.tscn" id="2_8arj1"] +[ext_resource type="Texture2D" uid="uid://1s0c37uoj4rf" path="res://material_maker/theme/default_theme_icons.svg" id="2_wpo6d"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_0r3o7"] +atlas = ExtResource("2_wpo6d") +region = Rect2(96, 192, 16, 16) + +[node name="FileOption" type="HBoxContainer" unique_id=1399365702] +offset_right = 94.0 +offset_bottom = 31.0 +size_flags_horizontal = 3 +script = ExtResource("1_3nbpc") +config_variable = "code_font" + +[node name="Reset" type="Button" parent="." unique_id=1833752383] +unique_name_in_owner = true +custom_minimum_size = Vector2(25, 0) +layout_mode = 2 +icon = SubResource("AtlasTexture_0r3o7") + +[node name="FilePickerButton" parent="." unique_id=275857412 instance=ExtResource("2_8arj1")] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 + +[connection signal="mouse_entered" from="." to="." method="_on_mouse_entered"] +[connection signal="pressed" from="Reset" to="." method="_on_reset_pressed"] +[connection signal="file_selected" from="FilePickerButton" to="." method="_on_file_picker_button_file_selected"] diff --git a/material_maker/windows/preferences/preferences.tscn b/material_maker/windows/preferences/preferences.tscn index 5e33751ba..6185bde58 100644 --- a/material_maker/windows/preferences/preferences.tscn +++ b/material_maker/windows/preferences/preferences.tscn @@ -1,14 +1,19 @@ -[gd_scene load_steps=8 format=3 uid="uid://c1j6a4jdggjm6"] +[gd_scene format=3 uid="uid://c1j6a4jdggjm6"] [ext_resource type="PackedScene" uid="uid://drg0s4lftblx3" path="res://material_maker/windows/preferences/bool_option.tscn" id="1"] [ext_resource type="Script" uid="uid://cwom8loyqsvf2" path="res://material_maker/windows/preferences/preferences.gd" id="2"] [ext_resource type="FontFile" uid="uid://bn648prik7soq" path="res://material_maker/theme/font_rubik/Rubik-416.ttf" id="2_vp06c"] [ext_resource type="PackedScene" uid="uid://3lo2jh781ten" path="res://material_maker/windows/preferences/float_option.tscn" id="3"] -[ext_resource type="Script" path="res://material_maker/windows/preferences/preferences_tree.gd" id="3_mlqij"] +[ext_resource type="Script" uid="uid://b6irr1ykhui6l" path="res://material_maker/windows/preferences/preferences_tree.gd" id="3_mlqij"] [ext_resource type="Script" uid="uid://gmystrme5ayw" path="res://material_maker/windows/preferences/lang_option.gd" id="4"] -[ext_resource type="Script" path="res://material_maker/windows/preferences/enum_option.gd" id="5_vp06c"] +[ext_resource type="Script" uid="uid://d3h4xmek7b2vq" path="res://material_maker/windows/preferences/enum_option.gd" id="5_vp06c"] +[ext_resource type="PackedScene" uid="uid://b7ko0gpbs5mqa" path="res://material_maker/windows/preferences/file_option.tscn" id="7_btfio"] -[node name="Preferences" type="Window"] +[sub_resource type="LabelSettings" id="LabelSettings_btfio"] +outline_size = 2 +shadow_size = 0 + +[node name="Preferences" type="Window" unique_id=2145384253] oversampling_override = 1.0 title = "Preferences" position = Vector2i(0, 36) @@ -16,7 +21,7 @@ size = Vector2i(700, 450) exclusive = true script = ExtResource("2") -[node name="HSplitContainer" type="HSplitContainer" parent="."] +[node name="HSplitContainer" type="HSplitContainer" parent="." unique_id=271938444] anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 @@ -24,10 +29,11 @@ grow_horizontal = 2 grow_vertical = 2 size_flags_horizontal = 6 size_flags_vertical = 3 -split_offset = 100 +split_offsets = PackedInt32Array(100) dragger_visibility = 2 +split_offset = 100 -[node name="PreferenceCategory" type="MarginContainer" parent="HSplitContainer"] +[node name="PreferenceCategory" type="MarginContainer" parent="HSplitContainer" unique_id=928014825] custom_minimum_size = Vector2(86.8, 0) layout_mode = 2 theme_override_constants/margin_left = 4 @@ -35,7 +41,7 @@ theme_override_constants/margin_top = 4 theme_override_constants/margin_right = 4 theme_override_constants/margin_bottom = 4 -[node name="Tree" type="Tree" parent="HSplitContainer/PreferenceCategory" groups=["updated_from_locale"]] +[node name="Tree" type="Tree" parent="HSplitContainer/PreferenceCategory" unique_id=904061228 groups=["updated_from_locale"]] unique_name_in_owner = true layout_mode = 2 theme_override_constants/item_margin = 2 @@ -44,19 +50,19 @@ theme_override_font_sizes/font_size = 18 auto_tooltip = false script = ExtResource("3_mlqij") -[node name="PreferencesPanel" type="MarginContainer" parent="HSplitContainer"] +[node name="PreferencesPanel" type="MarginContainer" parent="HSplitContainer" unique_id=1998010908] layout_mode = 2 theme_override_constants/margin_left = 4 theme_override_constants/margin_top = 4 theme_override_constants/margin_right = 4 theme_override_constants/margin_bottom = 4 -[node name="VBoxContainer" type="VBoxContainer" parent="HSplitContainer/PreferencesPanel"] +[node name="VBoxContainer" type="VBoxContainer" parent="HSplitContainer/PreferencesPanel" unique_id=1796643359] layout_mode = 2 size_flags_horizontal = 3 size_flags_vertical = 3 -[node name="TabContainer" type="TabContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer"] +[node name="TabContainer" type="TabContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer" unique_id=1848581355] unique_name_in_owner = true custom_minimum_size = Vector2(289, 172) layout_mode = 2 @@ -66,54 +72,54 @@ current_tab = 0 tabs_visible = false use_hidden_tabs_for_min_size = true -[node name="General" type="ScrollContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer"] +[node name="General" type="ScrollContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer" unique_id=1222059844] layout_mode = 2 theme_type_variation = &"MM_PreferenceTab" metadata/_tab_index = 0 -[node name="VBoxContainer" type="VBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General"] +[node name="VBoxContainer" type="VBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General" unique_id=1647018480] layout_mode = 2 size_flags_horizontal = 3 size_flags_vertical = 3 -[node name="Language" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer"] +[node name="Language" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer" unique_id=1508090842] layout_mode = 2 -[node name="Label2" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/Language"] +[node name="Label2" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/Language" unique_id=757622605] layout_mode = 2 text = "Language" -[node name="HBoxContainer" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/Language"] +[node name="HBoxContainer" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/Language" unique_id=1209093332] layout_mode = 2 size_flags_horizontal = 10 -[node name="Language" type="OptionButton" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/Language/HBoxContainer"] +[node name="Language" type="OptionButton" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/Language/HBoxContainer" unique_id=1949944455] unique_name_in_owner = true custom_minimum_size = Vector2(0, 10) layout_mode = 2 script = ExtResource("4") config_variable = "locale" -[node name="InstallLanguage" type="Button" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/Language/HBoxContainer"] +[node name="InstallLanguage" type="Button" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/Language/HBoxContainer" unique_id=531409130] layout_mode = 2 text = "Install" -[node name="DownloadLanguage" type="Button" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/Language/HBoxContainer"] +[node name="DownloadLanguage" type="Button" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/Language/HBoxContainer" unique_id=69884540] layout_mode = 2 text = "Download" -[node name="Spacer1" type="Control" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer"] +[node name="Spacer1" type="Control" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer" unique_id=508009642] custom_minimum_size = Vector2(0, 10) layout_mode = 2 -[node name="ConfirmQuit" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer"] +[node name="ConfirmQuit" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer" unique_id=497221492] layout_mode = 2 -[node name="Label" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/ConfirmQuit"] +[node name="Label" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/ConfirmQuit" unique_id=600851102] layout_mode = 2 text = "Confirm when quitting the application" -[node name="ConfirmQuit" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/ConfirmQuit" instance=ExtResource("1")] +[node name="ConfirmQuit" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/ConfirmQuit" unique_id=1374209146 instance=ExtResource("1")] custom_minimum_size = Vector2(200, 0) layout_mode = 2 size_flags_horizontal = 10 @@ -121,14 +127,14 @@ text = "On" flat = false config_variable = "confirm_quit" -[node name="ConfirmCloseProject" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer"] +[node name="ConfirmCloseProject" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer" unique_id=146020952] layout_mode = 2 -[node name="Label" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/ConfirmCloseProject"] +[node name="Label" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/ConfirmCloseProject" unique_id=286496676] layout_mode = 2 text = "Confirm when closing a project" -[node name="ConfirmCloseProject" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/ConfirmCloseProject" instance=ExtResource("1")] +[node name="ConfirmCloseProject" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/ConfirmCloseProject" unique_id=331253529 instance=ExtResource("1")] custom_minimum_size = Vector2(200, 0) layout_mode = 2 size_flags_horizontal = 10 @@ -136,18 +142,18 @@ text = "On" flat = false config_variable = "confirm_close_project" -[node name="Spacer2" type="Control" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer"] +[node name="Spacer2" type="Control" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer" unique_id=1551965185] custom_minimum_size = Vector2(0, 10) layout_mode = 2 -[node name="GuiScale" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer"] +[node name="GuiScale" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer" unique_id=1572521016] layout_mode = 2 -[node name="Label" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/GuiScale"] +[node name="Label" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/GuiScale" unique_id=938591164] layout_mode = 2 text = "UI scale (0 = auto)" -[node name="GuiScale" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/GuiScale" instance=ExtResource("3")] +[node name="GuiScale" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/GuiScale" unique_id=2069505826 instance=ExtResource("3")] custom_minimum_size = Vector2(200, 24) layout_mode = 2 size_flags_horizontal = 10 @@ -157,15 +163,15 @@ max_value = 2.0 step = 0.01 float_only = true -[node name="GuiUseNativeFileDialogs" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer"] +[node name="GuiUseNativeFileDialogs" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer" unique_id=2141940524] layout_mode = 2 -[node name="Label" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/GuiUseNativeFileDialogs"] +[node name="Label" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/GuiUseNativeFileDialogs" unique_id=282208627] layout_mode = 2 mouse_filter = 1 text = "Use native file dialogs" -[node name="GuiUseNativeFileDialogs" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/GuiUseNativeFileDialogs" instance=ExtResource("1")] +[node name="GuiUseNativeFileDialogs" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/GuiUseNativeFileDialogs" unique_id=1608517420 instance=ExtResource("1")] custom_minimum_size = Vector2(200, 0) layout_mode = 2 size_flags_horizontal = 10 @@ -174,15 +180,15 @@ text = "On" flat = false config_variable = "ui_use_native_file_dialogs" -[node name="DialogDimBackground" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer"] +[node name="DialogDimBackground" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer" unique_id=748179978] layout_mode = 2 -[node name="Label" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/DialogDimBackground"] +[node name="Label" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/DialogDimBackground" unique_id=904711112] layout_mode = 2 mouse_filter = 1 text = "Dim background when showing dialogs" -[node name="DialogDimBackground" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/DialogDimBackground" instance=ExtResource("1")] +[node name="DialogDimBackground" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/DialogDimBackground" unique_id=487432186 instance=ExtResource("1")] custom_minimum_size = Vector2(200, 0) layout_mode = 2 size_flags_horizontal = 10 @@ -191,19 +197,19 @@ text = "On" flat = false config_variable = "dialog_dim_background" -[node name="Spacer5" type="Control" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer"] +[node name="Spacer5" type="Control" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer" unique_id=696041464] custom_minimum_size = Vector2(0, 10) layout_mode = 2 -[node name="Gui3DPreviewResolution" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer"] +[node name="Gui3DPreviewResolution" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer" unique_id=1471091666] layout_mode = 2 -[node name="Label" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/Gui3DPreviewResolution"] +[node name="Label" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/Gui3DPreviewResolution" unique_id=507761280] layout_mode = 2 mouse_filter = 1 text = "3D preview resolution" -[node name="Gui3DPreviewResolution" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/Gui3DPreviewResolution" instance=ExtResource("3")] +[node name="Gui3DPreviewResolution" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/Gui3DPreviewResolution" unique_id=622862296 instance=ExtResource("3")] custom_minimum_size = Vector2(200, 24) layout_mode = 2 size_flags_horizontal = 10 @@ -215,15 +221,15 @@ max_value = 2.5 step = 0.1 float_only = true -[node name="Gui3DPreviewTesselationDetail" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer"] +[node name="Gui3DPreviewTesselationDetail" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer" unique_id=2113738513] layout_mode = 2 -[node name="Label" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/Gui3DPreviewTesselationDetail"] +[node name="Label" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/Gui3DPreviewTesselationDetail" unique_id=1584924224] layout_mode = 2 mouse_filter = 1 text = "3D preview tesselation detail" -[node name="Gui3DPreviewTesselationDetail" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/Gui3DPreviewTesselationDetail" instance=ExtResource("3")] +[node name="Gui3DPreviewTesselationDetail" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/Gui3DPreviewTesselationDetail" unique_id=1334445641 instance=ExtResource("3")] custom_minimum_size = Vector2(200, 24) layout_mode = 2 size_flags_horizontal = 10 @@ -237,14 +243,14 @@ max_value = 1024.0 step = 1.0 float_only = true -[node name="Gui3DPreviewSunShadow" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer"] +[node name="Gui3DPreviewSunShadow" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer" unique_id=756989100] layout_mode = 2 -[node name="Label" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/Gui3DPreviewSunShadow"] +[node name="Label" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/Gui3DPreviewSunShadow" unique_id=2039077855] layout_mode = 2 text = "3D preview sun shadow (requires restart)" -[node name="Gui3DPreviewSunShadow" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/Gui3DPreviewSunShadow" instance=ExtResource("1")] +[node name="Gui3DPreviewSunShadow" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/Gui3DPreviewSunShadow" unique_id=316901908 instance=ExtResource("1")] custom_minimum_size = Vector2(200, 0) layout_mode = 2 size_flags_horizontal = 10 @@ -255,20 +261,20 @@ text = "On" flat = false config_variable = "ui_3d_preview_sun_shadow" -[node name="WinTabletDriverSpacer" type="Control" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer"] +[node name="WinTabletDriverSpacer" type="Control" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer" unique_id=1126899447] unique_name_in_owner = true custom_minimum_size = Vector2(0, 10) layout_mode = 2 -[node name="WinTabletDriver" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer"] +[node name="WinTabletDriver" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer" unique_id=1498258950] unique_name_in_owner = true layout_mode = 2 -[node name="Label" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/WinTabletDriver"] +[node name="Label" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/WinTabletDriver" unique_id=1072578582] layout_mode = 2 text = "Tablet Driver" -[node name="EnumOption" type="OptionButton" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/WinTabletDriver"] +[node name="EnumOption" type="OptionButton" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/WinTabletDriver" unique_id=2006529568] custom_minimum_size = Vector2(200, 0) layout_mode = 2 size_flags_horizontal = 10 @@ -288,18 +294,18 @@ popup/item_2/id = 2 script = ExtResource("5_vp06c") config_variable = "win_tablet_driver" -[node name="Spacer3" type="Control" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer"] +[node name="Spacer3" type="Control" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer" unique_id=851524727] custom_minimum_size = Vector2(0, 10) layout_mode = 2 -[node name="EnableVSync" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer"] +[node name="EnableVSync" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer" unique_id=2005781101] layout_mode = 2 -[node name="Label" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/EnableVSync"] +[node name="Label" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/EnableVSync" unique_id=832733695] layout_mode = 2 text = "VSync" -[node name="EnableVSync" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/EnableVSync" instance=ExtResource("1")] +[node name="EnableVSync" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/EnableVSync" unique_id=1853883433 instance=ExtResource("1")] custom_minimum_size = Vector2(200, 0) layout_mode = 2 size_flags_horizontal = 10 @@ -307,14 +313,14 @@ text = "On" flat = false config_variable = "vsync" -[node name="FPSLimit" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer"] +[node name="FPSLimit" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer" unique_id=1027775171] layout_mode = 2 -[node name="Label" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/FPSLimit"] +[node name="Label" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/FPSLimit" unique_id=131787343] layout_mode = 2 text = "FPS Limit" -[node name="FPSLimit" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/FPSLimit" instance=ExtResource("3")] +[node name="FPSLimit" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/FPSLimit" unique_id=1277298467 instance=ExtResource("3")] custom_minimum_size = Vector2(200, 24) layout_mode = 2 size_flags_horizontal = 10 @@ -327,10 +333,10 @@ max_value = 200.0 step = 1.0 float_only = true -[node name="IdleFPSLimit" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer"] +[node name="IdleFPSLimit" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer" unique_id=1368388051] layout_mode = 2 -[node name="Label" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/IdleFPSLimit"] +[node name="Label" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/IdleFPSLimit" unique_id=989465938] layout_mode = 2 size_flags_horizontal = 0 tooltip_text = "FPS limit to use when window isn't focused to save CPU/GPU resources. @@ -338,7 +344,7 @@ Lower values may help reducing power usage, but could increase response time whe mouse_filter = 1 text = "Idle FPS limit" -[node name="IdleFPSLimit" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/IdleFPSLimit" instance=ExtResource("3")] +[node name="IdleFPSLimit" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer/IdleFPSLimit" unique_id=2115510592 instance=ExtResource("3")] custom_minimum_size = Vector2(200, 24) layout_mode = 2 size_flags_horizontal = 10 @@ -351,28 +357,177 @@ max_value = 20.0 step = 1.0 float_only = true -[node name="Spacer4" type="Control" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer"] +[node name="Spacer4" type="Control" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/General/VBoxContainer" unique_id=847502777] custom_minimum_size = Vector2(0, 10) layout_mode = 2 -[node name="Bake" type="ScrollContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer"] +[node name="Theme" type="ScrollContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer" unique_id=1111133403] visible = false layout_mode = 2 theme_type_variation = &"MM_PreferenceTab" metadata/_tab_index = 1 -[node name="VBoxContainer" type="VBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Bake"] +[node name="VBoxContainer" type="VBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Theme" unique_id=1231307394] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="SectionDisplayFont" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Theme/VBoxContainer" unique_id=486879697] +layout_mode = 2 +text = "Display Fonts (requires restart)" +label_settings = SubResource("LabelSettings_btfio") + +[node name="GuiInterfaceMainFont" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Theme/VBoxContainer" unique_id=758900584] +layout_mode = 2 + +[node name="Label" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Theme/VBoxContainer/GuiInterfaceMainFont" unique_id=1822476730] +layout_mode = 2 +text = "Main font" + +[node name="FileOption" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Theme/VBoxContainer/GuiInterfaceMainFont" unique_id=1399365702 instance=ExtResource("7_btfio")] +custom_minimum_size = Vector2(200, 0) +layout_mode = 2 +size_flags_horizontal = 10 +config_variable = "main_font" +file_picker_filters = PackedStringArray("*.ttf; TrueType Font file", "*.otf; OpenType Font file") + +[node name="GuiInterfaceMediumFont" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Theme/VBoxContainer" unique_id=34572927] +layout_mode = 2 + +[node name="Label" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Theme/VBoxContainer/GuiInterfaceMediumFont" unique_id=914702841] +layout_mode = 2 +text = "Medium font" + +[node name="FileOption" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Theme/VBoxContainer/GuiInterfaceMediumFont" unique_id=1544432129 instance=ExtResource("7_btfio")] +custom_minimum_size = Vector2(200, 0) +layout_mode = 2 +size_flags_horizontal = 10 +config_variable = "medium_font" +file_picker_filters = PackedStringArray("*.ttf; TrueType Font file", "*.otf; OpenType Font file") + +[node name="GuiInterfaceBoldFont" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Theme/VBoxContainer" unique_id=1462088612] +layout_mode = 2 + +[node name="Label" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Theme/VBoxContainer/GuiInterfaceBoldFont" unique_id=1490863117] +layout_mode = 2 +text = "Bold font" + +[node name="FileOption" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Theme/VBoxContainer/GuiInterfaceBoldFont" unique_id=945782835 instance=ExtResource("7_btfio")] +custom_minimum_size = Vector2(200, 0) +layout_mode = 2 +size_flags_horizontal = 10 +config_variable = "bold_font" +file_picker_filters = PackedStringArray("*.ttf; TrueType Font file", "*.otf; OpenType Font file") + +[node name="GuiInterfaceCodeFont" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Theme/VBoxContainer" unique_id=1481852751] +layout_mode = 2 + +[node name="Label" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Theme/VBoxContainer/GuiInterfaceCodeFont" unique_id=1662114990] +layout_mode = 2 +text = "Code font" + +[node name="FileOption" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Theme/VBoxContainer/GuiInterfaceCodeFont" unique_id=1735527225 instance=ExtResource("7_btfio")] +custom_minimum_size = Vector2(200, 0) +layout_mode = 2 +size_flags_horizontal = 10 +file_picker_filters = PackedStringArray("*.ttf; TrueType Font file", "*.otf; OpenType Font file") + +[node name="GuiInterfaceUseSystemFonts" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Theme/VBoxContainer" unique_id=1096584127] +layout_mode = 2 + +[node name="Label" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Theme/VBoxContainer/GuiInterfaceUseSystemFonts" unique_id=817621155] +layout_mode = 2 +text = "Use system fonts" + +[node name="UiUseSystemFonts" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Theme/VBoxContainer/GuiInterfaceUseSystemFonts" unique_id=270406247 instance=ExtResource("1")] +custom_minimum_size = Vector2(200, 0) +layout_mode = 2 +size_flags_horizontal = 10 +tooltip_text = "When enabled, system fonts will be used instead of Material Maker's built-in fonts or custom fonts set in preferences." +text = "On" +flat = false +config_variable = "ui_use_system_font" + +[node name="Spacer1" type="Control" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Theme/VBoxContainer" unique_id=1988482743] +custom_minimum_size = Vector2(0, 10) +layout_mode = 2 + +[node name="GuiInterfaceFontMSDF" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Theme/VBoxContainer" unique_id=2144824696] +layout_mode = 2 + +[node name="Label" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Theme/VBoxContainer/GuiInterfaceFontMSDF" unique_id=177195979] +layout_mode = 2 +text = "MSDF Rendering" + +[node name="UiFontUseMSDF" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Theme/VBoxContainer/GuiInterfaceFontMSDF" unique_id=609117319 instance=ExtResource("1")] +custom_minimum_size = Vector2(200, 0) +layout_mode = 2 +size_flags_horizontal = 10 +tooltip_text = "Enables MSDF(Multichannel Signed Distance Field) for font rendering. + +This makes text look crisp at any scale but is prone to artifacts if font glyphs have overlapping shapes." +text = "On" +flat = false +config_variable = "ui_font_enable_msdf" + +[node name="Spacer2" type="Control" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Theme/VBoxContainer" unique_id=1657519221] +custom_minimum_size = Vector2(0, 10) +layout_mode = 2 + +[node name="GuiInterfaceFontSize" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Theme/VBoxContainer" unique_id=197296407] +layout_mode = 2 + +[node name="Label" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Theme/VBoxContainer/GuiInterfaceFontSize" unique_id=83511662] +layout_mode = 2 +text = "UI font size" + +[node name="UiFontSize" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Theme/VBoxContainer/GuiInterfaceFontSize" unique_id=2037581063 instance=ExtResource("3")] +custom_minimum_size = Vector2(200, 24) +layout_mode = 2 +size_flags_horizontal = 10 +config_variable = "ui_font_size" +value = 16.0 +min_value = 16.0 +max_value = 48.0 +step = 1.0 +float_only = true + +[node name="GuiInterfaceCodeFontSize" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Theme/VBoxContainer" unique_id=1343680422] +layout_mode = 2 + +[node name="Label" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Theme/VBoxContainer/GuiInterfaceCodeFontSize" unique_id=1460436146] +layout_mode = 2 +text = "Code font size" + +[node name="UiCodeFontSize" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Theme/VBoxContainer/GuiInterfaceCodeFontSize" unique_id=336987241 instance=ExtResource("3")] +custom_minimum_size = Vector2(200, 24) +layout_mode = 2 +size_flags_horizontal = 10 +config_variable = "ui_code_font_size" +value = 16.0 +min_value = 16.0 +max_value = 48.0 +step = 1.0 +float_only = true + +[node name="Bake" type="ScrollContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer" unique_id=289908114] +visible = false +layout_mode = 2 +theme_type_variation = &"MM_PreferenceTab" +metadata/_tab_index = 2 + +[node name="VBoxContainer" type="VBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Bake" unique_id=629545617] layout_mode = 2 size_flags_horizontal = 3 -[node name="RayCount" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Bake/VBoxContainer"] +[node name="RayCount" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Bake/VBoxContainer" unique_id=488510891] layout_mode = 2 -[node name="LabelRayCount" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Bake/VBoxContainer/RayCount"] +[node name="LabelRayCount" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Bake/VBoxContainer/RayCount" unique_id=449898473] layout_mode = 2 text = "Ray Count" -[node name="RayCount" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Bake/VBoxContainer/RayCount" instance=ExtResource("3")] +[node name="RayCount" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Bake/VBoxContainer/RayCount" unique_id=1291018687 instance=ExtResource("3")] custom_minimum_size = Vector2(200, 24) layout_mode = 2 size_flags_horizontal = 10 @@ -383,14 +538,14 @@ max_value = 256.0 step = 1.0 float_only = true -[node name="RayLength" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Bake/VBoxContainer"] +[node name="RayLength" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Bake/VBoxContainer" unique_id=1989642041] layout_mode = 2 -[node name="LabelRayLength" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Bake/VBoxContainer/RayLength"] +[node name="LabelRayLength" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Bake/VBoxContainer/RayLength" unique_id=1723155113] layout_mode = 2 text = "Ray Length" -[node name="RayLength" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Bake/VBoxContainer/RayLength" instance=ExtResource("3")] +[node name="RayLength" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Bake/VBoxContainer/RayLength" unique_id=1956594674 instance=ExtResource("3")] custom_minimum_size = Vector2(200, 24) layout_mode = 2 size_flags_horizontal = 10 @@ -401,14 +556,14 @@ max_value = 1024.0 step = 1.0 float_only = true -[node name="RayBias" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Bake/VBoxContainer"] +[node name="RayBias" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Bake/VBoxContainer" unique_id=1122729862] layout_mode = 2 -[node name="LabelRayBias" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Bake/VBoxContainer/RayBias"] +[node name="LabelRayBias" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Bake/VBoxContainer/RayBias" unique_id=1609515634] layout_mode = 2 text = "Ray Bias" -[node name="RayBias" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Bake/VBoxContainer/RayBias" instance=ExtResource("3")] +[node name="RayBias" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Bake/VBoxContainer/RayBias" unique_id=508448016 instance=ExtResource("3")] custom_minimum_size = Vector2(200, 24) layout_mode = 2 size_flags_horizontal = 10 @@ -418,14 +573,14 @@ max_value = 1024.0 step = 0.001 float_only = true -[node name="DenoiseRadius" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Bake/VBoxContainer"] +[node name="DenoiseRadius" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Bake/VBoxContainer" unique_id=375649414] layout_mode = 2 -[node name="LabelDenoiseRadius" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Bake/VBoxContainer/DenoiseRadius"] +[node name="LabelDenoiseRadius" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Bake/VBoxContainer/DenoiseRadius" unique_id=1093689420] layout_mode = 2 text = "Denoise Radius" -[node name="DenoiseRadius" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Bake/VBoxContainer/DenoiseRadius" instance=ExtResource("3")] +[node name="DenoiseRadius" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Bake/VBoxContainer/DenoiseRadius" unique_id=682402701 instance=ExtResource("3")] custom_minimum_size = Vector2(200, 24) layout_mode = 2 size_flags_horizontal = 10 @@ -436,24 +591,24 @@ max_value = 10.0 step = 1.0 float_only = true -[node name="Graph" type="ScrollContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer"] +[node name="Graph" type="ScrollContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer" unique_id=1612915659] visible = false layout_mode = 2 theme_type_variation = &"MM_PreferenceTab" -metadata/_tab_index = 2 +metadata/_tab_index = 3 -[node name="VBoxContainer" type="VBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Graph"] +[node name="VBoxContainer" type="VBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Graph" unique_id=1157689446] layout_mode = 2 size_flags_horizontal = 3 -[node name="AutoSizeComment" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Graph/VBoxContainer"] +[node name="AutoSizeComment" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Graph/VBoxContainer" unique_id=990105751] layout_mode = 2 -[node name="Label" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Graph/VBoxContainer/AutoSizeComment"] +[node name="Label" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Graph/VBoxContainer/AutoSizeComment" unique_id=1561877089] layout_mode = 2 text = "Auto size comment node to selection" -[node name="AutoSizeComment" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Graph/VBoxContainer/AutoSizeComment" instance=ExtResource("1")] +[node name="AutoSizeComment" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Graph/VBoxContainer/AutoSizeComment" unique_id=2005796697 instance=ExtResource("1")] custom_minimum_size = Vector2(200, 0) layout_mode = 2 size_flags_horizontal = 10 @@ -461,14 +616,14 @@ text = "On" flat = false config_variable = "auto_size_comment" -[node name="NodeMinimizeButton" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Graph/VBoxContainer"] +[node name="NodeMinimizeButton" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Graph/VBoxContainer" unique_id=447849857] layout_mode = 2 -[node name="LabelNodeMinBtn" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Graph/VBoxContainer/NodeMinimizeButton"] +[node name="LabelNodeMinBtn" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Graph/VBoxContainer/NodeMinimizeButton" unique_id=1791900897] layout_mode = 2 text = "Show minimize button on nodes" -[node name="NodeMinimizeButton" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Graph/VBoxContainer/NodeMinimizeButton" instance=ExtResource("1")] +[node name="NodeMinimizeButton" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Graph/VBoxContainer/NodeMinimizeButton" unique_id=1933240223 instance=ExtResource("1")] custom_minimum_size = Vector2(200, 0) layout_mode = 2 size_flags_horizontal = 10 @@ -478,14 +633,14 @@ text = "On" flat = false config_variable = "node_minimize_button" -[node name="NodeCloseButton" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Graph/VBoxContainer"] +[node name="NodeCloseButton" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Graph/VBoxContainer" unique_id=826938357] layout_mode = 2 -[node name="LabelNodeCloseButton" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Graph/VBoxContainer/NodeCloseButton"] +[node name="LabelNodeCloseButton" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Graph/VBoxContainer/NodeCloseButton" unique_id=177286080] layout_mode = 2 text = "Show close button on nodes" -[node name="NodeCloseButton" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Graph/VBoxContainer/NodeCloseButton" instance=ExtResource("1")] +[node name="NodeCloseButton" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Graph/VBoxContainer/NodeCloseButton" unique_id=1094596744 instance=ExtResource("1")] custom_minimum_size = Vector2(200, 0) layout_mode = 2 size_flags_horizontal = 10 @@ -494,24 +649,24 @@ text = "On" flat = false config_variable = "node_close_button" -[node name="Export" type="ScrollContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer"] +[node name="Export" type="ScrollContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer" unique_id=2071321920] visible = false layout_mode = 2 theme_type_variation = &"MM_PreferenceTab" -metadata/_tab_index = 3 +metadata/_tab_index = 4 -[node name="VBoxContainer" type="VBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Export"] +[node name="VBoxContainer" type="VBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Export" unique_id=1887967844] layout_mode = 2 size_flags_horizontal = 3 -[node name="RememberAnimExport" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Export/VBoxContainer"] +[node name="RememberAnimExport" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Export/VBoxContainer" unique_id=236060632] layout_mode = 2 -[node name="Label" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Export/VBoxContainer/RememberAnimExport"] +[node name="Label" type="Label" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Export/VBoxContainer/RememberAnimExport" unique_id=1951027809] layout_mode = 2 text = "Remember last animation export settings" -[node name="RememberAnimExport" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Export/VBoxContainer/RememberAnimExport" instance=ExtResource("1")] +[node name="RememberAnimExport" parent="HSplitContainer/PreferencesPanel/VBoxContainer/TabContainer/Export/VBoxContainer/RememberAnimExport" unique_id=1175684037 instance=ExtResource("1")] custom_minimum_size = Vector2(200, 0) layout_mode = 2 size_flags_horizontal = 10 @@ -520,27 +675,27 @@ text = "On" flat = false config_variable = "remember_anim_export" -[node name="MarginContainer" type="MarginContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer"] +[node name="MarginContainer" type="MarginContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer" unique_id=393568239] layout_mode = 2 theme_override_constants/margin_top = 4 theme_override_constants/margin_right = 4 theme_override_constants/margin_bottom = 4 -[node name="HBoxContainer" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/MarginContainer"] +[node name="HBoxContainer" type="HBoxContainer" parent="HSplitContainer/PreferencesPanel/VBoxContainer/MarginContainer" unique_id=1977401467] layout_mode = 2 size_flags_horizontal = 8 -[node name="Apply" type="Button" parent="HSplitContainer/PreferencesPanel/VBoxContainer/MarginContainer/HBoxContainer"] +[node name="Apply" type="Button" parent="HSplitContainer/PreferencesPanel/VBoxContainer/MarginContainer/HBoxContainer" unique_id=789496206] custom_minimum_size = Vector2(80, 0) layout_mode = 2 text = "Apply" -[node name="OK" type="Button" parent="HSplitContainer/PreferencesPanel/VBoxContainer/MarginContainer/HBoxContainer"] +[node name="OK" type="Button" parent="HSplitContainer/PreferencesPanel/VBoxContainer/MarginContainer/HBoxContainer" unique_id=1154681862] custom_minimum_size = Vector2(80, 0) layout_mode = 2 text = "OK" -[node name="Cancel" type="Button" parent="HSplitContainer/PreferencesPanel/VBoxContainer/MarginContainer/HBoxContainer"] +[node name="Cancel" type="Button" parent="HSplitContainer/PreferencesPanel/VBoxContainer/MarginContainer/HBoxContainer" unique_id=142579278] custom_minimum_size = Vector2(80, 0) layout_mode = 2 text = "Cancel" diff --git a/material_maker/windows/preferences/preferences_tree.gd b/material_maker/windows/preferences/preferences_tree.gd index e819d1a4f..3d7aa4f6f 100644 --- a/material_maker/windows/preferences/preferences_tree.gd +++ b/material_maker/windows/preferences/preferences_tree.gd @@ -18,6 +18,7 @@ func update_tree() -> void: var item: TreeItem = create_item() item.set_text(0, " %s " % tr(child.name)) item.set_metadata(0, child.get_index()) + item.set_custom_font(0, FontManager.medium_font) sections.append(item) set_selected(sections[selected_section_id], 0)