aboutsummaryrefslogtreecommitdiff
path: root/date_picker/date_picker.tscn
diff options
context:
space:
mode:
authordam <dam@gudinoff>2021-12-05 02:54:05 +0000
committerdam <dam@gudinoff>2021-12-05 02:54:05 +0000
commit1a575d34a178fdcc0d6e72a22e8de1e6da7c88c4 (patch)
tree22173f764b75c696790d872e1d6821cd574ba586 /date_picker/date_picker.tscn
parent54515ea48a167a931c0f1aeb9d0170af7e147547 (diff)
downloadsurgery-log-1a575d34a178fdcc0d6e72a22e8de1e6da7c88c4.tar.zst
surgery-log-1a575d34a178fdcc0d6e72a22e8de1e6da7c88c4.zip
Implement date picker.
Diffstat (limited to 'date_picker/date_picker.tscn')
-rw-r--r--date_picker/date_picker.tscn136
1 files changed, 25 insertions, 111 deletions
diff --git a/date_picker/date_picker.tscn b/date_picker/date_picker.tscn
index 3f77742..3414283 100644
--- a/date_picker/date_picker.tscn
+++ b/date_picker/date_picker.tscn
@@ -10,7 +10,7 @@ __meta__ = {
"_edit_use_anchors_": false
}
-[node name="year_scroll" type="Control" parent="."]
+[node name="year_value" type="Control" parent="."]
anchor_right = 0.333
anchor_bottom = 1.0
script = ExtResource( 1 )
@@ -19,7 +19,7 @@ __meta__ = {
}
max_value = 9999
-[node name="value_previous" type="Label" parent="year_scroll"]
+[node name="previous" type="Label" parent="year_value"]
anchor_right = 1.0
anchor_bottom = 0.333
mouse_filter = 1
@@ -29,16 +29,7 @@ __meta__ = {
"_edit_use_anchors_": false
}
-[node name="ColorRect" type="ColorRect" parent="year_scroll/value_previous"]
-anchor_right = 1.0
-anchor_bottom = 1.0
-mouse_filter = 2
-color = Color( 0, 1, 1, 0.0980392 )
-__meta__ = {
-"_edit_use_anchors_": false
-}
-
-[node name="value" type="Label" parent="year_scroll"]
+[node name="current" type="Label" parent="year_value"]
anchor_top = 0.333
anchor_right = 1.0
anchor_bottom = 0.666
@@ -49,22 +40,16 @@ __meta__ = {
"_edit_use_anchors_": false
}
-[node name="ColorRect" type="ColorRect" parent="year_scroll/value"]
-anchor_right = 1.0
-anchor_bottom = 1.0
-mouse_filter = 2
-color = Color( 1, 1, 1, 0.0980392 )
-__meta__ = {
-"_edit_use_anchors_": false
-}
-
-[node name="input" type="LineEdit" parent="year_scroll/value"]
+[node name="input" type="LineEdit" parent="year_value/current"]
visible = false
anchor_right = 1.0
anchor_bottom = 1.0
+focus_next = NodePath("../../../month_value/current/input")
align = 1
+max_length = 4
+caret_blink = true
-[node name="value_next" type="Label" parent="year_scroll"]
+[node name="next" type="Label" parent="year_value"]
anchor_top = 0.666
anchor_right = 1.0
anchor_bottom = 1.0
@@ -75,20 +60,7 @@ __meta__ = {
"_edit_use_anchors_": false
}
-[node name="ColorRect" type="ColorRect" parent="year_scroll/value_next"]
-anchor_right = 1.0
-anchor_bottom = 1.0
-mouse_filter = 2
-color = Color( 1, 1, 0, 0.0980392 )
-__meta__ = {
-"_edit_use_anchors_": false
-}
-
-[node name="debug" type="Label" parent="year_scroll"]
-anchor_right = 1.0
-anchor_bottom = 1.0
-
-[node name="month_scroll" type="Control" parent="."]
+[node name="month_value" type="Control" parent="."]
anchor_left = 0.333
anchor_right = 0.666
anchor_bottom = 1.0
@@ -96,7 +68,7 @@ script = ExtResource( 1 )
min_value = 1
max_value = 12
-[node name="value_previous" type="Label" parent="month_scroll"]
+[node name="previous" type="Label" parent="month_value"]
anchor_right = 1.0
anchor_bottom = 0.333
mouse_filter = 1
@@ -106,16 +78,7 @@ __meta__ = {
"_edit_use_anchors_": false
}
-[node name="ColorRect" type="ColorRect" parent="month_scroll/value_previous"]
-anchor_right = 1.0
-anchor_bottom = 1.0
-mouse_filter = 2
-color = Color( 0, 1, 1, 0.0980392 )
-__meta__ = {
-"_edit_use_anchors_": false
-}
-
-[node name="value" type="Label" parent="month_scroll"]
+[node name="current" type="Label" parent="month_value"]
anchor_top = 0.333
anchor_right = 1.0
anchor_bottom = 0.666
@@ -126,22 +89,17 @@ __meta__ = {
"_edit_use_anchors_": false
}
-[node name="ColorRect" type="ColorRect" parent="month_scroll/value"]
-anchor_right = 1.0
-anchor_bottom = 1.0
-mouse_filter = 2
-color = Color( 1, 1, 1, 0.0980392 )
-__meta__ = {
-"_edit_use_anchors_": false
-}
-
-[node name="input" type="LineEdit" parent="month_scroll/value"]
+[node name="input" type="LineEdit" parent="month_value/current"]
visible = false
anchor_right = 1.0
anchor_bottom = 1.0
+focus_next = NodePath("../../../day_value/current/input")
+focus_previous = NodePath("../../../year_value/current/input")
align = 1
+max_length = 2
+caret_blink = true
-[node name="value_next" type="Label" parent="month_scroll"]
+[node name="next" type="Label" parent="month_value"]
anchor_top = 0.666
anchor_right = 1.0
anchor_bottom = 1.0
@@ -152,20 +110,7 @@ __meta__ = {
"_edit_use_anchors_": false
}
-[node name="ColorRect" type="ColorRect" parent="month_scroll/value_next"]
-anchor_right = 1.0
-anchor_bottom = 1.0
-mouse_filter = 2
-color = Color( 1, 1, 0, 0.0980392 )
-__meta__ = {
-"_edit_use_anchors_": false
-}
-
-[node name="debug" type="Label" parent="month_scroll"]
-anchor_right = 1.0
-anchor_bottom = 1.0
-
-[node name="day_scroll" type="Control" parent="."]
+[node name="day_value" type="Control" parent="."]
anchor_left = 0.666
anchor_right = 1.0
anchor_bottom = 1.0
@@ -176,7 +121,7 @@ __meta__ = {
min_value = 1
max_value = 31
-[node name="value_previous" type="Label" parent="day_scroll"]
+[node name="previous" type="Label" parent="day_value"]
anchor_right = 1.0
anchor_bottom = 0.333
mouse_filter = 1
@@ -186,16 +131,7 @@ __meta__ = {
"_edit_use_anchors_": false
}
-[node name="ColorRect" type="ColorRect" parent="day_scroll/value_previous"]
-anchor_right = 1.0
-anchor_bottom = 1.0
-mouse_filter = 2
-color = Color( 0, 1, 1, 0.0980392 )
-__meta__ = {
-"_edit_use_anchors_": false
-}
-
-[node name="value" type="Label" parent="day_scroll"]
+[node name="current" type="Label" parent="day_value"]
anchor_top = 0.333
anchor_right = 1.0
anchor_bottom = 0.666
@@ -206,22 +142,16 @@ __meta__ = {
"_edit_use_anchors_": false
}
-[node name="ColorRect" type="ColorRect" parent="day_scroll/value"]
-anchor_right = 1.0
-anchor_bottom = 1.0
-mouse_filter = 2
-color = Color( 1, 1, 1, 0.0980392 )
-__meta__ = {
-"_edit_use_anchors_": false
-}
-
-[node name="input" type="LineEdit" parent="day_scroll/value"]
+[node name="input" type="LineEdit" parent="day_value/current"]
visible = false
anchor_right = 1.0
anchor_bottom = 1.0
+focus_previous = NodePath("../../../month_value/current/input")
align = 1
+max_length = 2
+caret_blink = true
-[node name="value_next" type="Label" parent="day_scroll"]
+[node name="next" type="Label" parent="day_value"]
anchor_top = 0.666
anchor_right = 1.0
anchor_bottom = 1.0
@@ -232,22 +162,6 @@ __meta__ = {
"_edit_use_anchors_": false
}
-[node name="ColorRect" type="ColorRect" parent="day_scroll/value_next"]
-anchor_right = 1.0
-anchor_bottom = 1.0
-mouse_filter = 2
-color = Color( 1, 1, 0, 0.0980392 )
-__meta__ = {
-"_edit_use_anchors_": false
-}
-
-[node name="debug" type="Label" parent="day_scroll"]
-anchor_right = 1.0
-anchor_bottom = 1.0
-__meta__ = {
-"_edit_use_anchors_": false
-}
-
[node name="split_previous" type="ColorRect" parent="."]
anchor_top = 0.333
anchor_right = 1.0