bar can be resized in code

This commit is contained in:
Tabby 2026-06-01 00:13:23 +10:00
parent b9d5940fac
commit 181f3eaf50
3 changed files with 60 additions and 17 deletions

View file

@ -112,9 +112,8 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
min_value = 100.0
step = 0.0
value = 100.0
value = 50.0
nine_patch_stretch = true
texture_progress = SubResource("GradientTexture1D_1bvp3")
@ -133,7 +132,6 @@ oversampling_override = 1.0
title = "SleepClock Options"
initial_position = 1
size = Vector2i(450, 300)
visible = false
unresizable = true
always_on_top = true
minimize_disabled = true
@ -213,13 +211,45 @@ max_value = 59.0
suffix = "m"
select_all_on_focus = true
[node name="Label2" type="Label" parent="Options Window/MarginContainer/VBoxContainer/GridContainer" unique_id=201796106]
[node name="Label4" type="Label" parent="Options Window/MarginContainer/VBoxContainer/GridContainer" unique_id=1856476808]
layout_mode = 2
text = "Things that will go here:
- bar end time
- bar duration
- text to display inside bar
- where to display bar"
text = "Bar Position"
[node name="OptionButton" type="OptionButton" parent="Options Window/MarginContainer/VBoxContainer/GridContainer" unique_id=1955200779]
layout_mode = 2
selected = 0
item_count = 2
popup/item_0/text = "Bottom"
popup/item_0/id = 0
popup/item_1/text = "Right"
popup/item_1/id = 1
[node name="Label2" type="Label" parent="Options Window/MarginContainer/VBoxContainer/GridContainer" unique_id=1597493397]
layout_mode = 2
text = "Bar Size"
[node name="HBoxContainer3" type="HBoxContainer" parent="Options Window/MarginContainer/VBoxContainer/GridContainer" unique_id=1274134494]
layout_mode = 2
[node name="Label" type="Label" parent="Options Window/MarginContainer/VBoxContainer/GridContainer/HBoxContainer3" unique_id=531473775]
layout_mode = 2
text = "10px"
[node name="HSlider" type="HSlider" parent="Options Window/MarginContainer/VBoxContainer/GridContainer/HBoxContainer3" unique_id=271540690]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 4
min_value = 10.0
max_value = 50.0
step = 10.0
value = 10.0
tick_count = 5
ticks_on_borders = true
[node name="Label2" type="Label" parent="Options Window/MarginContainer/VBoxContainer" unique_id=201796106]
layout_mode = 2
text = "todo:
- text to display inside bar"
label_settings = SubResource("LabelSettings_1bvp3")
[node name="HBoxContainer" type="HBoxContainer" parent="Options Window/MarginContainer/VBoxContainer" unique_id=2066769118]