fixed the podbooker to function well in Godot 4

This commit is contained in:
Jaap Marsman 2023-04-21 14:43:54 +08:00
parent 5682528713
commit 7cd10c890a
4 changed files with 58 additions and 6 deletions

View File

@ -33,7 +33,7 @@ offset_top = 110.0
offset_right = -5.0 offset_right = -5.0
offset_bottom = -5.0 offset_bottom = -5.0
theme = ExtResource("2") theme = ExtResource("2")
columns = 9 columns = 8
script = ExtResource("1") script = ExtResource("1")
[node name="A1L1" type="Button" parent="ButtonGrid"] [node name="A1L1" type="Button" parent="ButtonGrid"]
@ -85,6 +85,7 @@ size_flags_vertical = 3
theme = ExtResource("2") theme = ExtResource("2")
[node name="GL1" type="Button" parent="ButtonGrid"] [node name="GL1" type="Button" parent="ButtonGrid"]
visible = false
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
size_flags_vertical = 3 size_flags_vertical = 3
@ -139,6 +140,7 @@ size_flags_vertical = 3
theme = ExtResource("2") theme = ExtResource("2")
[node name="GL2" type="Button" parent="ButtonGrid"] [node name="GL2" type="Button" parent="ButtonGrid"]
visible = false
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
size_flags_vertical = 3 size_flags_vertical = 3
@ -193,6 +195,7 @@ size_flags_vertical = 3
theme = ExtResource("2") theme = ExtResource("2")
[node name="GL3" type="Button" parent="ButtonGrid"] [node name="GL3" type="Button" parent="ButtonGrid"]
visible = false
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
size_flags_vertical = 3 size_flags_vertical = 3
@ -247,6 +250,7 @@ size_flags_vertical = 3
theme = ExtResource("2") theme = ExtResource("2")
[node name="GL4" type="Button" parent="ButtonGrid"] [node name="GL4" type="Button" parent="ButtonGrid"]
visible = false
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
size_flags_vertical = 3 size_flags_vertical = 3
@ -302,6 +306,7 @@ theme = ExtResource("2")
[node name="GL5" type="Button" parent="ButtonGrid"] [node name="GL5" type="Button" parent="ButtonGrid"]
unique_name_in_owner = true unique_name_in_owner = true
visible = false
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
size_flags_vertical = 3 size_flags_vertical = 3
@ -365,6 +370,7 @@ theme = ExtResource("2")
[node name="GL8" type="Button" parent="ButtonGrid"] [node name="GL8" type="Button" parent="ButtonGrid"]
unique_name_in_owner = true unique_name_in_owner = true
visible = false
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
size_flags_vertical = 3 size_flags_vertical = 3
@ -419,6 +425,7 @@ size_flags_vertical = 3
theme = ExtResource("2") theme = ExtResource("2")
[node name="GL6" type="Button" parent="ButtonGrid"] [node name="GL6" type="Button" parent="ButtonGrid"]
visible = false
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
size_flags_vertical = 3 size_flags_vertical = 3
@ -473,6 +480,7 @@ size_flags_vertical = 3
theme = ExtResource("2") theme = ExtResource("2")
[node name="GL7" type="Button" parent="ButtonGrid"] [node name="GL7" type="Button" parent="ButtonGrid"]
visible = false
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
size_flags_vertical = 3 size_flags_vertical = 3
@ -971,7 +979,7 @@ offset_right = 1147.0
offset_bottom = 114.0 offset_bottom = 114.0
size_flags_horizontal = 3 size_flags_horizontal = 3
theme = ExtResource("2") theme = ExtResource("2")
columns = 9 columns = 8
[node name="A1Label" type="Label" parent="TitleGrid"] [node name="A1Label" type="Label" parent="TitleGrid"]
layout_mode = 2 layout_mode = 2
@ -979,6 +987,7 @@ size_flags_horizontal = 3
size_flags_vertical = 3 size_flags_vertical = 3
theme = ExtResource("2") theme = ExtResource("2")
text = "Pod A1" text = "Pod A1"
horizontal_alignment = 1
[node name="A2Label" type="Label" parent="TitleGrid"] [node name="A2Label" type="Label" parent="TitleGrid"]
layout_mode = 2 layout_mode = 2
@ -986,6 +995,7 @@ size_flags_horizontal = 3
size_flags_vertical = 3 size_flags_vertical = 3
theme = ExtResource("2") theme = ExtResource("2")
text = "Pod A2" text = "Pod A2"
horizontal_alignment = 1
[node name="B1Label" type="Label" parent="TitleGrid"] [node name="B1Label" type="Label" parent="TitleGrid"]
layout_mode = 2 layout_mode = 2
@ -993,6 +1003,7 @@ size_flags_horizontal = 3
size_flags_vertical = 3 size_flags_vertical = 3
theme = ExtResource("2") theme = ExtResource("2")
text = "Pod B1" text = "Pod B1"
horizontal_alignment = 1
[node name="B2Label" type="Label" parent="TitleGrid"] [node name="B2Label" type="Label" parent="TitleGrid"]
layout_mode = 2 layout_mode = 2
@ -1000,6 +1011,7 @@ size_flags_horizontal = 3
size_flags_vertical = 3 size_flags_vertical = 3
theme = ExtResource("2") theme = ExtResource("2")
text = "Pod B2" text = "Pod B2"
horizontal_alignment = 1
[node name="CLabel" type="Label" parent="TitleGrid"] [node name="CLabel" type="Label" parent="TitleGrid"]
layout_mode = 2 layout_mode = 2
@ -1007,6 +1019,7 @@ size_flags_horizontal = 3
size_flags_vertical = 3 size_flags_vertical = 3
theme = ExtResource("2") theme = ExtResource("2")
text = "Pod C" text = "Pod C"
horizontal_alignment = 1
[node name="DLabel" type="Label" parent="TitleGrid"] [node name="DLabel" type="Label" parent="TitleGrid"]
layout_mode = 2 layout_mode = 2
@ -1014,6 +1027,7 @@ size_flags_horizontal = 3
size_flags_vertical = 3 size_flags_vertical = 3
theme = ExtResource("2") theme = ExtResource("2")
text = "Pod D" text = "Pod D"
horizontal_alignment = 1
[node name="ELabel" type="Label" parent="TitleGrid"] [node name="ELabel" type="Label" parent="TitleGrid"]
layout_mode = 2 layout_mode = 2
@ -1021,6 +1035,7 @@ size_flags_horizontal = 3
size_flags_vertical = 3 size_flags_vertical = 3
theme = ExtResource("2") theme = ExtResource("2")
text = "Pod E" text = "Pod E"
horizontal_alignment = 1
[node name="FLabel" type="Label" parent="TitleGrid"] [node name="FLabel" type="Label" parent="TitleGrid"]
layout_mode = 2 layout_mode = 2
@ -1028,8 +1043,10 @@ size_flags_horizontal = 3
size_flags_vertical = 3 size_flags_vertical = 3
theme = ExtResource("2") theme = ExtResource("2")
text = "Pod F" text = "Pod F"
horizontal_alignment = 1
[node name="GLabel" type="Label" parent="TitleGrid"] [node name="GLabel" type="Label" parent="TitleGrid"]
visible = false
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
size_flags_vertical = 3 size_flags_vertical = 3
@ -1115,6 +1132,9 @@ text = "<<"
[node name="DayLabel" type="Label" parent="DaySelector"] [node name="DayLabel" type="Label" parent="DaySelector"]
unique_name_in_owner = true unique_name_in_owner = true
layout_mode = 2 layout_mode = 2
theme = ExtResource("2")
theme_override_colors/font_color = Color(0.647059, 0, 0, 1)
theme_override_font_sizes/font_size = 20
text = "Day" text = "Day"
[node name="Right" type="Button" parent="DaySelector"] [node name="Right" type="Button" parent="DaySelector"]
@ -1285,10 +1305,14 @@ text = "Clear Booking"
[node name="SettingsButton" type="TextureButton" parent="."] [node name="SettingsButton" type="TextureButton" parent="."]
unique_name_in_owner = true unique_name_in_owner = true
offset_left = 997.0 anchors_preset = 1
anchor_left = 1.0
anchor_right = 1.0
offset_left = -27.0
offset_top = 3.0 offset_top = 3.0
offset_right = 2197.0 offset_right = 1173.0
offset_bottom = 1203.0 offset_bottom = 1203.0
grow_horizontal = 0
scale = Vector2(0.02, 0.02) scale = Vector2(0.02, 0.02)
texture_normal = ExtResource("7") texture_normal = ExtResource("7")

View File

@ -13,12 +13,34 @@ cache/0/16/0/underline_position = 0.0
cache/0/16/0/underline_thickness = 0.0 cache/0/16/0/underline_thickness = 0.0
cache/0/16/0/scale = 1.0 cache/0/16/0/scale = 1.0
cache/0/16/0/kerning_overrides/16/0 = Vector2(0, 0) cache/0/16/0/kerning_overrides/16/0 = Vector2(0, 0)
cache/0/16/0/kerning_overrides/18/0 = Vector2(0, 0)
cache/0/16/0/kerning_overrides/20/0 = Vector2(0, 0)
cache/0/18/0/ascent = 0.0
cache/0/18/0/descent = 0.0
cache/0/18/0/underline_position = 0.0
cache/0/18/0/underline_thickness = 0.0
cache/0/18/0/scale = 1.0
cache/0/18/0/kerning_overrides/16/0 = Vector2(0, 0)
cache/0/18/0/kerning_overrides/18/0 = Vector2(0, 0)
cache/0/18/0/kerning_overrides/20/0 = Vector2(0, 0)
cache/0/20/0/ascent = 0.0
cache/0/20/0/descent = 0.0
cache/0/20/0/underline_position = 0.0
cache/0/20/0/underline_thickness = 0.0
cache/0/20/0/scale = 1.0
cache/0/20/0/kerning_overrides/16/0 = Vector2(0, 0)
cache/0/20/0/kerning_overrides/18/0 = Vector2(0, 0)
cache/0/20/0/kerning_overrides/20/0 = Vector2(0, 0)
[sub_resource type="StyleBoxFlat" id="3"] [sub_resource type="StyleBoxFlat" id="3"]
bg_color = Color(0.427451, 0.431373, 0.443137, 1) bg_color = Color(0.427451, 0.431373, 0.443137, 1)
[sub_resource type="StyleBoxFlat" id="2"] [sub_resource type="StyleBoxFlat" id="2"]
bg_color = Color(0, 0.0431373, 0.294118, 1) bg_color = Color(0, 0.0431373, 0.294118, 1)
corner_radius_top_left = 10
corner_radius_top_right = 10
corner_radius_bottom_right = 10
corner_radius_bottom_left = 10
[sub_resource type="StyleBoxFlat" id="4"] [sub_resource type="StyleBoxFlat" id="4"]
bg_color = Color(0.647059, 0, 0, 1) bg_color = Color(0.647059, 0, 0, 1)

View File

@ -21,9 +21,14 @@ config/macos_native_icon="res://assets/logo.icns"
[display] [display]
window/stretch/mode="2d" window/stretch/mode="canvas_items"
window/size/fullscreen=true window/size/fullscreen=true
[filesystem]
import/blender/enabled=false
import/fbx/enabled=false
[gui] [gui]
common/drop_mouse_on_gui_input_disabled=true common/drop_mouse_on_gui_input_disabled=true
@ -34,6 +39,7 @@ common/enable_pause_aware_picking=true
[rendering] [rendering]
renderer/rendering_method="gl_compatibility"
environment/defaults/default_environment="res://default_env.tres" environment/defaults/default_environment="res://default_env.tres"
quality/driver/driver_name="GLES2" quality/driver/driver_name="GLES2"
2d/snapping/use_gpu_pixel_snap=true 2d/snapping/use_gpu_pixel_snap=true

View File

@ -97,6 +97,6 @@ func _process(_delta):
func on_timer_beat(): func on_timer_beat():
important_vars.day_uid2 = str(day_number) + str(month_number) + str(year_number) important_vars.day_uid2 = str(day_number) + str(month_number) + str(year_number)
print("Yup!") print("Yup! We're changing days if we need to")
if important_vars.day_uid != important_vars.day_uid2: if important_vars.day_uid != important_vars.day_uid2:
get_tree().reload_current_scene() get_tree().reload_current_scene()