feat: file-based config system + fix dashboard background rendering
This commit is contained in:
parent
c026c74af2
commit
c6bc1edda4
7 changed files with 97 additions and 20 deletions
|
|
@ -1,5 +1,5 @@
|
|||
@tool
|
||||
extends Control
|
||||
extends PanelContainer
|
||||
|
||||
|
||||
@onready var grid: DashboardGrid = %DashboardGrid
|
||||
|
|
@ -8,16 +8,19 @@ var _modules: Array = []
|
|||
|
||||
|
||||
func _ready() -> void:
|
||||
if Engine.is_editor_hint():
|
||||
_set_background()
|
||||
return
|
||||
_set_background()
|
||||
_add_modules()
|
||||
if not Engine.is_editor_hint():
|
||||
_add_modules()
|
||||
|
||||
|
||||
func _set_background() -> void:
|
||||
var bg := StyleBoxFlat.new()
|
||||
bg.bg_color = Color(0.08, 0.08, 0.12, 1.0)
|
||||
var bg: StyleBoxFlat
|
||||
if ConfigManager.has_method("get_color"):
|
||||
bg = StyleBoxFlat.new()
|
||||
bg.bg_color = ConfigManager.get_color("background_color", Color(0.08, 0.08, 0.12))
|
||||
else:
|
||||
bg = StyleBoxFlat.new()
|
||||
bg.bg_color = Color(0.08, 0.08, 0.12)
|
||||
add_theme_stylebox_override("panel", bg)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue