Allow disabling LogUI and other changes to LogUI

The config key 'logui_background' has been removed in favour of 'logui_background_color' and 'logui_enabled'. 'logui_enabled' controls whenether LogUI is displayed or not. To achieve the background transparency, 'logui_background_color' should be set to 'Color.TRANSPARENT'.
This commit is contained in:
JeremyStar™ 2024-02-09 14:27:55 +01:00
parent 538ba01aec
commit d92e276ed8
2 changed files with 4 additions and 6 deletions

View file

@ -35,7 +35,7 @@ class_name CoreConfiguration
@export var logger_newlines_override: bool
@export var logger_newlines_sizelimit: int
@export_category("LogUI")
@export var logui_background: bool
@export var logui_enabled: bool
@export var logui_background_color: Color
@export var logui_font_size: int
@ -52,6 +52,6 @@ func _init() -> void:
logger_newlines_override = true
logger_newlines_sizelimit = 40
# LogUI
logui_background = true
logui_background_color = Color.BLACK
logui_enabled = true
logui_background_color = Color.BLACK # To disable the background, use Color.TRANSPARENT
logui_font_size = 14

View file

@ -59,9 +59,7 @@ func _initialize() -> void:
logrtl.add_theme_font_size_override("bold_font_size", 14)
func _pull_config() -> void:
background.visible = !core.config.headless
if core.config.logui_background: background.self_modulate.a = 1
else: background.self_modulate.a = 0
background.visible = !core.config.headless and core.config.logui_enabled
background.color = core.config.logui_background_color
logrtl.add_theme_font_size_override("normal_font_size", core.config.logui_font_size)
logrtl.add_theme_font_size_override("bold_font_size", core.config.logui_font_size)