add godot project scaffold: root scene, autoload, panel base, theme, icon

This commit is contained in:
Eric Smith 2026-05-20 12:41:00 -04:00
parent 14e2343615
commit ab147c6f9e
9 changed files with 69 additions and 0 deletions

0
addons/.gitkeep Normal file
View file

4
assets/icons/icon.svg Normal file
View file

@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64">
<rect width="64" height="64" rx="8" fill="#1a1a2e"/>
<text x="32" y="42" font-family="sans-serif" font-size="32" font-weight="bold" fill="#e94560" text-anchor="middle">V</text>
</svg>

After

Width:  |  Height:  |  Size: 272 B

View file

@ -0,0 +1,23 @@
extends Node
signal config_changed(key: String, value: Variant)
var _settings: Dictionary = {
"refresh_interval": 1.0,
"show_cpu": true,
"show_memory": true,
"show_network": true,
"show_disk": true,
"theme": "default",
}
func get_setting(key: String, default_value: Variant = null) -> Variant:
return _settings.get(key, default_value)
func set_setting(key: String, value: Variant) -> void:
if _settings.has(key) and _settings[key] != value:
_settings[key] = value
config_changed.emit(key, value)

5
main.gd Normal file
View file

@ -0,0 +1,5 @@
extends Control
func _ready() -> void:
pass

9
main.tscn Normal file
View file

@ -0,0 +1,9 @@
[gd_scene load_steps=3 format=3 uid="uid://dppdkwlpqiqhi"]
[ext_resource type="Script" path="res://main.gd" id="1"]
[ext_resource type="Theme" path="res://themes/default_theme.tres" id="2"]
[node name="Main" type="Control"]
anchors_preset = 0
theme = ExtResource("2")
script = ExtResource("1")

0
panels/.gitkeep Normal file
View file

24
scripts/panel_base.gd Normal file
View file

@ -0,0 +1,24 @@
extends PanelContainer
class_name PanelBase
signal panel_activated
signal panel_deactivated
func _ready() -> void:
pass
func activate() -> void:
show()
panel_activated.emit()
func deactivate() -> void:
hide()
panel_deactivated.emit()
func refresh(data: Dictionary) -> void:
pass

0
shaders/.gitkeep Normal file
View file

View file

@ -0,0 +1,4 @@
[gd_resource type="Theme" load_steps=2 format=3 uid="uid://c40owcowutir5"]
[resource]
resource_name = "Default Theme"