This repository has been archived on 2026-03-28. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
2025-08-24 16:18:07 -04:00

38 lines
1.3 KiB
GDScript

extends Control
class_name MainHUD
@onready var crt_frame: TextureRect = $CRTFrame
@onready var game_viewport: SubViewport = $GameViewportContainer/GameViewport
@onready var crt_shader: ColorRect = $CRTShader
@onready var resource_panel: PanelContainer = $ResourcePanel
@onready var crew_roster_panel: PanelContainer = $CrewRosterPanel
func _ready() -> void:
# Initialize the HUD
_setup_crt_effect()
_setup_ui_placeholders()
func _setup_crt_effect() -> void:
# Setup the CRT frame and shader
# TODO: Load the actual CRT frame texture in a future story (see Story 1.3)
crt_frame.texture = null # Placeholder texture
# Create and apply the CRT shader material
var crt_material = ShaderMaterial.new()
# We'll create the shader in a separate file
crt_material.shader = preload("res://assets/shaders/crt_shader.gdshader")
crt_shader.material = crt_material
# Debug: Print shader information
print("CRT Shader Material Applied: ", crt_shader.material != null)
if crt_shader.material:
print("Shader Type: ", crt_shader.material.get_class())
print("Shader Resource: ", crt_shader.material.shader)
func _setup_ui_placeholders() -> void:
# Setup the UI placeholders
# The panels are already in the scene tree
# We'll just ensure they're visible
resource_panel.visible = true
crew_roster_panel.visible = true