initial commit, hope i didnt push any keys :P

This commit is contained in:
anne
2023-02-07 17:46:01 +01:00
commit 1416a35df1
362 changed files with 7234 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
extends HBoxContainer
export var use_12_hours := true setget set_use_12_hours
export(Resource) var moment = Moment.new() setget set_moment
onready var hour = $hour
onready var minute = $minute
onready var am_pm := $VBoxContainer/am_pm
func set_moment(new_moment:Moment):
moment = new_moment
_update()
func set_use_12_hours(new_value:bool):
use_12_hours = new_value
_update()
func _update():
minute.text = moment.padded_minute()
am_pm.visible = use_12_hours
am_pm.text = moment.am_pm()
if use_12_hours:
hour.text = moment.padded_hour_12()
else:
hour.text = moment.padded_hour()
+51
View File
@@ -0,0 +1,51 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://assets/font/resource/time_small.tres" type="DynamicFont" id=1]
[ext_resource path="res://assets/font/resource/time_big.tres" type="DynamicFont" id=2]
[ext_resource path="res://scenes/time_display/time_display.gd" type="Script" id=3]
[node name="time_display" type="HBoxContainer"]
margin_right = 116.0
margin_bottom = 45.0
script = ExtResource( 3 )
[node name="hour" type="Label" parent="."]
margin_right = 92.0
margin_bottom = 89.0
custom_fonts/font = ExtResource( 2 )
text = "10"
[node name="Control" type="Control" parent="."]
margin_left = 96.0
margin_right = 116.0
margin_bottom = 89.0
rect_min_size = Vector2( 20, 0 )
size_flags_horizontal = 3
[node name="minute" type="Label" parent="."]
margin_left = 120.0
margin_right = 212.0
margin_bottom = 89.0
custom_fonts/font = ExtResource( 2 )
text = "12"
[node name="VBoxContainer" type="VBoxContainer" parent="."]
margin_left = 216.0
margin_right = 246.0
margin_bottom = 89.0
custom_constants/separation = 0
[node name="am_pm" type="Label" parent="VBoxContainer"]
margin_right = 30.0
margin_bottom = 78.0
size_flags_vertical = 3
custom_fonts/font = ExtResource( 1 )
text = "am"
valign = 2
uppercase = true
[node name="Control" type="Control" parent="VBoxContainer"]
margin_top = 78.0
margin_right = 30.0
margin_bottom = 89.0
rect_min_size = Vector2( 0, 11 )