feat: add circular time-of-day dial to UI
A 60x60 circular dial drawn at the top-center of the screen shows the current position in the day/night cycle. A filled arc sweeps clockwise from the top; the color transitions from dark blue (night) through orange (dawn), gold (day), and pink (dusk). A small glow dot marks the leading tip; a phase label (Night/Dawn/Day/Dusk) sits below. Redraws only when the cycle fraction changes. References DayNightCycle via node_path so it stays in sync with the environment lighting.
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
[ext_resource type="Script" uid="uid://bbwol3mrjgn2x" path="res://world/active_world_adapter.gd" id="9_adapter"]
|
||||
[ext_resource type="Script" path="res://simulation/persistence/SaveSlotController.gd" id="10_save"]
|
||||
[ext_resource type="PackedScene" path="res://world/jajce/JajceWorld.tscn" id="11_jajce"]
|
||||
[ext_resource type="Script" path="res://world/ui/time_dial.gd" id="12_timedial"]
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_o5qli"]
|
||||
radius = 0.4
|
||||
@@ -124,3 +125,12 @@ layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.96, 0.91, 0.78, 1)
|
||||
theme_override_font_sizes/font_size = 15
|
||||
text = "Villager inspector"
|
||||
|
||||
[node name="TimeDial" type="Control" parent="UI" node_paths=PackedStringArray("day_night_cycle")]
|
||||
layout_mode = 0
|
||||
offset_left = 880.0
|
||||
offset_top = 6.0
|
||||
offset_right = 940.0
|
||||
offset_bottom = 66.0
|
||||
script = ExtResource("12_timedial")
|
||||
day_night_cycle = NodePath("../JajceWorld/DayNightCycle")
|
||||
|
||||
Reference in New Issue
Block a user