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:
parent
538ba01aec
commit
d92e276ed8
2 changed files with 4 additions and 6 deletions
|
@ -35,7 +35,7 @@ class_name CoreConfiguration
|
||||||
@export var logger_newlines_override: bool
|
@export var logger_newlines_override: bool
|
||||||
@export var logger_newlines_sizelimit: int
|
@export var logger_newlines_sizelimit: int
|
||||||
@export_category("LogUI")
|
@export_category("LogUI")
|
||||||
@export var logui_background: bool
|
@export var logui_enabled: bool
|
||||||
@export var logui_background_color: Color
|
@export var logui_background_color: Color
|
||||||
@export var logui_font_size: int
|
@export var logui_font_size: int
|
||||||
|
|
||||||
|
@ -52,6 +52,6 @@ func _init() -> void:
|
||||||
logger_newlines_override = true
|
logger_newlines_override = true
|
||||||
logger_newlines_sizelimit = 40
|
logger_newlines_sizelimit = 40
|
||||||
# LogUI
|
# LogUI
|
||||||
logui_background = true
|
logui_enabled = true
|
||||||
logui_background_color = Color.BLACK
|
logui_background_color = Color.BLACK # To disable the background, use Color.TRANSPARENT
|
||||||
logui_font_size = 14
|
logui_font_size = 14
|
||||||
|
|
|
@ -59,9 +59,7 @@ func _initialize() -> void:
|
||||||
logrtl.add_theme_font_size_override("bold_font_size", 14)
|
logrtl.add_theme_font_size_override("bold_font_size", 14)
|
||||||
|
|
||||||
func _pull_config() -> void:
|
func _pull_config() -> void:
|
||||||
background.visible = !core.config.headless
|
background.visible = !core.config.headless and core.config.logui_enabled
|
||||||
if core.config.logui_background: background.self_modulate.a = 1
|
|
||||||
else: background.self_modulate.a = 0
|
|
||||||
background.color = core.config.logui_background_color
|
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("normal_font_size", core.config.logui_font_size)
|
||||||
logrtl.add_theme_font_size_override("bold_font_size", core.config.logui_font_size)
|
logrtl.add_theme_font_size_override("bold_font_size", core.config.logui_font_size)
|
||||||
|
|
Loading…
Reference in a new issue