mirror of
https://github.com/CrispyPin/ovr-utils.git
synced 2025-05-16 12:15:30 +02:00
adjust offsets better
This commit is contained in:
parent
d4c381ce03
commit
8466a37827
4 changed files with 29 additions and 21 deletions
|
@ -1,8 +1,15 @@
|
|||
[gd_scene load_steps=4 format=2]
|
||||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[ext_resource path="res://overlays/time.gd" type="Script" id=1]
|
||||
[ext_resource path="res://fonts/OpenSans-Regular.ttf" type="DynamicFontData" id=2]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id=2]
|
||||
bg_color = Color( 0, 0, 0, 0.705882 )
|
||||
expand_margin_left = 8.0
|
||||
expand_margin_right = 8.0
|
||||
expand_margin_top = 8.0
|
||||
expand_margin_bottom = 8.0
|
||||
|
||||
[sub_resource type="DynamicFont" id=1]
|
||||
size = 48
|
||||
font_data = ExtResource( 2 )
|
||||
|
@ -16,29 +23,24 @@ __meta__ = {
|
|||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="."]
|
||||
[node name="ColorRect" type="PanelContainer" parent="."]
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
margin_left = -222.0
|
||||
margin_left = -60.0
|
||||
margin_top = -32.0
|
||||
margin_right = 222.0
|
||||
margin_bottom = 32.0
|
||||
color = Color( 0, 0, 0, 0.705882 )
|
||||
margin_right = 61.0
|
||||
margin_bottom = 35.0
|
||||
size_flags_horizontal = 0
|
||||
custom_styles/panel = SubResource( 2 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Label" type="Label" parent="ColorRect"]
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
margin_left = -512.0
|
||||
margin_top = -33.5
|
||||
margin_right = 512.0
|
||||
margin_bottom = 33.5
|
||||
margin_right = 121.0
|
||||
margin_bottom = 67.0
|
||||
custom_fonts/font = SubResource( 1 )
|
||||
text = "00:00"
|
||||
align = 1
|
||||
|
|
|
@ -4,12 +4,14 @@ extends Label
|
|||
func _ready() -> void:
|
||||
pass
|
||||
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
_update_time()
|
||||
|
||||
|
||||
func _update_time():
|
||||
var h = str(OS.get_time().hour)
|
||||
var m = str(OS.get_time().minute)
|
||||
h = h if len(h) == 2 else "0" + h
|
||||
m = m if len(m) == 2 else "0" + m
|
||||
text = "%s:%s" % [h, m]
|
||||
text = h + ":" + m
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue