Skip to content

Commit ed9b9fc

Browse files
committed
add climate and power labels
1 parent fba26dc commit ed9b9fc

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

TimePowerLabel.gd

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
extends Label
2+
3+
4+
# Called every frame. 'delta' is the elapsed time since the previous frame.
5+
func _process(delta):
6+
text = GlobalVars.stime + " " + GlobalVars.spower + " KW demand"

main scene.tscn

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[gd_scene load_steps=21 format=3 uid="uid://dlewy2ppts022"]
1+
[gd_scene load_steps=22 format=3 uid="uid://dlewy2ppts022"]
22

33
[ext_resource type="TileSet" uid="uid://bigbiha614tnl" path="res://tileset.tres" id="1_dur42"]
44
[ext_resource type="Script" path="res://main scene.gd" id="1_xhh2k"]
@@ -14,6 +14,7 @@
1414
[ext_resource type="Texture2D" uid="uid://cij3ermexjjux" path="res://uistuff/waterui.png" id="7_hrffa"]
1515
[ext_resource type="Texture2D" uid="uid://d3h27yw28kbem" path="res://uistuff/coalui.png" id="8_00j3h"]
1616
[ext_resource type="Texture2D" uid="uid://dyxfr110a1xsu" path="res://uistuff/bitsui.png" id="9_oegee"]
17+
[ext_resource type="Script" path="res://TimePowerLabel.gd" id="10_5bt7y"]
1718
[ext_resource type="Texture2D" uid="uid://bcv16fbofoniw" path="res://uistuff/oilui.png" id="13_xw0jl"]
1819
[ext_resource type="Theme" uid="uid://bpvpg7fswoucc" path="res://Buttonthemes.tres" id="15_07nre"]
1920
[ext_resource type="FontFile" uid="uid://bu8t6fcjbd13w" path="res://Silkscreen-Regular.ttf" id="17_dsinh"]
@@ -71,6 +72,22 @@ autostart = true
7172
wait_time = 5.0
7273
autostart = true
7374

75+
[node name="CanvasLayer" type="CanvasLayer" parent="."]
76+
77+
[node name="CanvasModulate2" type="CanvasModulate" parent="CanvasLayer"]
78+
script = ExtResource("3_28gw3")
79+
80+
[node name="TimePowerLabel" type="Label" parent="CanvasLayer"]
81+
unique_name_in_owner = true
82+
offset_left = 24.0
83+
offset_top = 15.0
84+
offset_right = 323.0
85+
offset_bottom = 35.0
86+
theme_override_fonts/font = ExtResource("17_dsinh")
87+
theme_override_font_sizes/font_size = 30
88+
text = "Day 0, Spring 12:00 AM, 70 Kilowatts"
89+
script = ExtResource("10_5bt7y")
90+
7491
[node name="Camera2D" type="Camera2D" parent="."]
7592
zoom = Vector2(3, 3)
7693
script = ExtResource("4_e6nis")
@@ -366,6 +383,16 @@ Generates 1 bit ps
366383
Low Carbon generation
367384
"
368385

386+
[node name="banktext2" type="Label" parent="Camera2D"]
387+
offset_left = 68.0
388+
offset_top = -133.0
389+
offset_right = 1458.0
390+
offset_bottom = 251.0
391+
scale = Vector2(0.05, 0.05)
392+
theme_override_fonts/font = ExtResource("17_dsinh")
393+
theme_override_font_sizes/font_size = 300
394+
text = "Climate"
395+
369396
[connection signal="timeout" from="timer for climatechange" to="." method="_on_timer_timeout"]
370397
[connection signal="timeout" from="timer for ui" to="." method="_on_timer_for_ui_timeout"]
371398
[connection signal="mouse_entered" from="Camera2D/Powerplantbutton" to="." method="_on_powerplantbutton_mouse_entered"]

0 commit comments

Comments
 (0)