yippee
This commit is contained in:
parent
d34084867b
commit
10a7e89e3a
4 changed files with 82 additions and 88 deletions
44
clock.gd
Normal file
44
clock.gd
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
extends Control
|
||||||
|
|
||||||
|
var taskbar_height : int = 50
|
||||||
|
@export var bar: TextureProgressBar
|
||||||
|
|
||||||
|
# Called when the node enters the scene tree for the first time.
|
||||||
|
func _ready() -> void:
|
||||||
|
position.y = 0
|
||||||
|
var screen_size : Vector2i = DisplayServer.screen_get_size()
|
||||||
|
#DisplayServer.window_set_size(Vector2i(screen_size.x, 10))
|
||||||
|
#size.x = screen_size.x
|
||||||
|
#size.y = 10
|
||||||
|
#DisplayServer.window_set_min_size(Vector2i(1,1))
|
||||||
|
get_window().min_size = Vector2i(1,1)
|
||||||
|
get_window().size = Vector2i(screen_size.x, 10)
|
||||||
|
DisplayServer.window_set_position(Vector2i(0,screen_size.y-10-taskbar_height))
|
||||||
|
position.y = 0
|
||||||
|
|
||||||
|
#position = Vector2i(0,screen_size.y-10-taskbar_height)
|
||||||
|
#get_window().size = Vector2i(screen_size.x, 10)
|
||||||
|
pass # Replace with function body.
|
||||||
|
|
||||||
|
|
||||||
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
|
func _process(delta: float) -> void:
|
||||||
|
var days : float = (Time.get_unix_time_from_system() + (60*60*10)) / 86400
|
||||||
|
var offset : float = 0.5 # 0 = midday, 12 = midnight
|
||||||
|
# bar should fill from 11:30pm (11.5) -> 1:30am (13.5)
|
||||||
|
var current_day : float = fmod(days + offset,1)
|
||||||
|
var mini_hour : float = 1.0/24.0
|
||||||
|
bar.max_value = mini_hour * 13.5
|
||||||
|
bar.min_value = mini_hour * 11.5
|
||||||
|
bar.value = current_day
|
||||||
|
#print(current_day)
|
||||||
|
|
||||||
|
if (bar.value >= 0.50):
|
||||||
|
bar.modulate = Color.RED
|
||||||
|
else:
|
||||||
|
bar.modulate = Color.DODGER_BLUE
|
||||||
|
|
||||||
|
#var screen_size : Vector2i = DisplayServer.screen_get_size()
|
||||||
|
#DisplayServer.window_set_size(Vector2i(screen_size.x, 10))
|
||||||
|
#get_window().size = Vector2i(screen_size.x, 10)
|
||||||
|
pass
|
||||||
1
clock.gd.uid
Normal file
1
clock.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://dp4nvppf3b0gj
|
||||||
114
main.tscn
114
main.tscn
|
|
@ -1,25 +1,28 @@
|
||||||
[gd_scene format=3 uid="uid://df4wh83ypl085"]
|
[gd_scene format=3 uid="uid://df4wh83ypl085"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://dblnpuq85tsmq" path="res://main.gd" id="1_h2yge"]
|
[ext_resource type="Script" uid="uid://dp4nvppf3b0gj" path="res://clock.gd" id="1_h2yge"]
|
||||||
[ext_resource type="Script" uid="uid://njpp5gvmxi7f" path="res://TitleBar.gd" id="1_ig7tw"]
|
[ext_resource type="Script" uid="uid://njpp5gvmxi7f" path="res://TitleBar.gd" id="1_ig7tw"]
|
||||||
[ext_resource type="Texture2D" uid="uid://b502wtiwv20em" path="res://Sprites/statusIcon.png" id="3_h2yge"]
|
[ext_resource type="Texture2D" uid="uid://b502wtiwv20em" path="res://Sprites/statusIcon.png" id="3_h2yge"]
|
||||||
|
|
||||||
[node name="Control" type="Control" unique_id=577067945 node_paths=PackedStringArray("player_name", "player_rank", "player_score", "cell_rank", "cell_score", "player_request", "cell_request", "cell_name")]
|
[sub_resource type="Gradient" id="Gradient_h2yge"]
|
||||||
|
offsets = PackedFloat32Array(1)
|
||||||
|
colors = PackedColorArray(1, 1, 1, 1)
|
||||||
|
|
||||||
|
[sub_resource type="GradientTexture1D" id="GradientTexture1D_1bvp3"]
|
||||||
|
gradient = SubResource("Gradient_h2yge")
|
||||||
|
|
||||||
|
[node name="Control" type="Control" unique_id=577067945 node_paths=PackedStringArray("bar")]
|
||||||
|
modulate = Color(1, 1, 1, 0.42745098)
|
||||||
layout_mode = 3
|
layout_mode = 3
|
||||||
anchors_preset = 15
|
anchors_preset = 12
|
||||||
|
anchor_top = 1.0
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
|
offset_top = -10.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 0
|
||||||
script = ExtResource("1_h2yge")
|
script = ExtResource("1_h2yge")
|
||||||
player_name = NodePath("VBoxContainer/MainContent/OnTask/playerName")
|
bar = NodePath("VBoxContainer/MainContent/bar")
|
||||||
player_rank = NodePath("VBoxContainer/MainContent/OnTask/GridContainer/playerRank")
|
|
||||||
player_score = NodePath("VBoxContainer/MainContent/OnTask/GridContainer/playerScore")
|
|
||||||
cell_rank = NodePath("VBoxContainer/MainContent/OnTask/GridContainer2/cellRank")
|
|
||||||
cell_score = NodePath("VBoxContainer/MainContent/OnTask/GridContainer2/cellScore")
|
|
||||||
player_request = NodePath("playerRequest")
|
|
||||||
cell_request = NodePath("cellRequest")
|
|
||||||
cell_name = NodePath("VBoxContainer/MainContent/OnTask/cellName")
|
|
||||||
|
|
||||||
[node name="Background" type="ColorRect" parent="." unique_id=641703216]
|
[node name="Background" type="ColorRect" parent="." unique_id=641703216]
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
|
|
@ -39,6 +42,7 @@ grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
|
|
||||||
[node name="TitleBar" type="PanelContainer" parent="VBoxContainer" unique_id=1245189107 node_paths=PackedStringArray("options_menu")]
|
[node name="TitleBar" type="PanelContainer" parent="VBoxContainer" unique_id=1245189107 node_paths=PackedStringArray("options_menu")]
|
||||||
|
visible = false
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
script = ExtResource("1_ig7tw")
|
script = ExtResource("1_ig7tw")
|
||||||
options_menu = NodePath("../../StatusIndicator/PopupMenu")
|
options_menu = NodePath("../../StatusIndicator/PopupMenu")
|
||||||
|
|
@ -66,72 +70,20 @@ size_flags_vertical = 3
|
||||||
theme_override_constants/separation = 0
|
theme_override_constants/separation = 0
|
||||||
alignment = 1
|
alignment = 1
|
||||||
|
|
||||||
[node name="playerName" type="Label" parent="VBoxContainer/MainContent/OnTask" unique_id=1091176720]
|
[node name="bar" type="TextureProgressBar" parent="VBoxContainer/MainContent" unique_id=1249279407]
|
||||||
modulate = Color(1, 0.58431375, 1, 1)
|
modulate = Color(0, 0.64705884, 1, 1)
|
||||||
layout_mode = 2
|
layout_mode = 1
|
||||||
text = "LunarLynx 😜"
|
anchors_preset = 15
|
||||||
horizontal_alignment = 1
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
[node name="GridContainer" type="GridContainer" parent="VBoxContainer/MainContent/OnTask" unique_id=938839243]
|
grow_horizontal = 2
|
||||||
layout_mode = 2
|
grow_vertical = 2
|
||||||
columns = 2
|
min_value = 11.5
|
||||||
|
max_value = 13.5
|
||||||
[node name="Label" type="Label" parent="VBoxContainer/MainContent/OnTask/GridContainer" unique_id=1388196608]
|
step = 0.0
|
||||||
layout_mode = 2
|
value = 13.5
|
||||||
size_flags_horizontal = 3
|
nine_patch_stretch = true
|
||||||
text = "Rank:"
|
texture_progress = SubResource("GradientTexture1D_1bvp3")
|
||||||
horizontal_alignment = 2
|
|
||||||
|
|
||||||
[node name="playerRank" type="Label" parent="VBoxContainer/MainContent/OnTask/GridContainer" unique_id=482359721]
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 3
|
|
||||||
text = "..."
|
|
||||||
|
|
||||||
[node name="Label2" type="Label" parent="VBoxContainer/MainContent/OnTask/GridContainer" unique_id=1618465185]
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 3
|
|
||||||
text = "Score:"
|
|
||||||
horizontal_alignment = 2
|
|
||||||
|
|
||||||
[node name="playerScore" type="Label" parent="VBoxContainer/MainContent/OnTask/GridContainer" unique_id=994771734]
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 3
|
|
||||||
text = "..."
|
|
||||||
|
|
||||||
[node name="HSeparator" type="HSeparator" parent="VBoxContainer/MainContent/OnTask" unique_id=1485557779]
|
|
||||||
layout_mode = 2
|
|
||||||
|
|
||||||
[node name="cellName" type="Label" parent="VBoxContainer/MainContent/OnTask" unique_id=157893317]
|
|
||||||
modulate = Color(1, 0.58431375, 1, 1)
|
|
||||||
layout_mode = 2
|
|
||||||
text = "The Catgirl Mafia [MIAW]"
|
|
||||||
horizontal_alignment = 1
|
|
||||||
|
|
||||||
[node name="GridContainer2" type="GridContainer" parent="VBoxContainer/MainContent/OnTask" unique_id=959168299]
|
|
||||||
layout_mode = 2
|
|
||||||
columns = 2
|
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="VBoxContainer/MainContent/OnTask/GridContainer2" unique_id=521074097]
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 3
|
|
||||||
text = "Rank:"
|
|
||||||
horizontal_alignment = 2
|
|
||||||
|
|
||||||
[node name="cellRank" type="Label" parent="VBoxContainer/MainContent/OnTask/GridContainer2" unique_id=1333088748]
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 3
|
|
||||||
text = "..."
|
|
||||||
|
|
||||||
[node name="Label2" type="Label" parent="VBoxContainer/MainContent/OnTask/GridContainer2" unique_id=639603789]
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 3
|
|
||||||
text = "Score:"
|
|
||||||
horizontal_alignment = 2
|
|
||||||
|
|
||||||
[node name="cellScore" type="Label" parent="VBoxContainer/MainContent/OnTask/GridContainer2" unique_id=329730910]
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 3
|
|
||||||
text = "..."
|
|
||||||
|
|
||||||
[node name="StatusIndicator" type="StatusIndicator" parent="." unique_id=1039426600]
|
[node name="StatusIndicator" type="StatusIndicator" parent="." unique_id=1039426600]
|
||||||
icon = ExtResource("3_h2yge")
|
icon = ExtResource("3_h2yge")
|
||||||
|
|
@ -157,12 +109,6 @@ item_5/text = "Large"
|
||||||
item_5/checkable = 2
|
item_5/checkable = 2
|
||||||
item_5/id = 4
|
item_5/id = 4
|
||||||
|
|
||||||
[node name="playerRequest" type="HTTPRequest" parent="." unique_id=692196380]
|
|
||||||
|
|
||||||
[node name="cellRequest" type="HTTPRequest" parent="." unique_id=1748890035]
|
|
||||||
|
|
||||||
[connection signal="gui_input" from="VBoxContainer/TitleBar" to="VBoxContainer/TitleBar" method="_on_TitleBar_gui_input"]
|
[connection signal="gui_input" from="VBoxContainer/TitleBar" to="VBoxContainer/TitleBar" method="_on_TitleBar_gui_input"]
|
||||||
[connection signal="id_pressed" from="StatusIndicator/PopupMenu" to="." method="_on_popup_menu_id_pressed"]
|
[connection signal="id_pressed" from="StatusIndicator/PopupMenu" to="." method="_on_popup_menu_id_pressed"]
|
||||||
[connection signal="id_pressed" from="StatusIndicator/PopupMenu" to="VBoxContainer/TitleBar" method="_on_popup_menu_id_pressed"]
|
[connection signal="id_pressed" from="StatusIndicator/PopupMenu" to="VBoxContainer/TitleBar" method="_on_popup_menu_id_pressed"]
|
||||||
[connection signal="request_completed" from="playerRequest" to="." method="player_request_completed"]
|
|
||||||
[connection signal="request_completed" from="cellRequest" to="." method="cell_request_completed"]
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ compatibility/default_parent_skeleton_in_mesh_instance_3d=true
|
||||||
|
|
||||||
[application]
|
[application]
|
||||||
|
|
||||||
config/name="Payphone Watcher"
|
config/name="GadgetClock"
|
||||||
run/main_scene="uid://df4wh83ypl085"
|
run/main_scene="uid://df4wh83ypl085"
|
||||||
config/features=PackedStringArray("4.6", "GL Compatibility")
|
config/features=PackedStringArray("4.6", "GL Compatibility")
|
||||||
run/max_fps=60
|
run/max_fps=60
|
||||||
|
|
@ -23,12 +23,15 @@ config/icon="uid://8b1b188aav14"
|
||||||
|
|
||||||
[display]
|
[display]
|
||||||
|
|
||||||
window/size/viewport_width=200
|
window/size/viewport_width=2560
|
||||||
window/size/viewport_height=180
|
window/size/viewport_height=10
|
||||||
window/size/resizable=false
|
window/size/resizable=false
|
||||||
window/size/borderless=true
|
window/size/borderless=true
|
||||||
window/size/always_on_top=true
|
window/size/always_on_top=true
|
||||||
window/stretch/mode="canvas_items"
|
window/size/transparent=true
|
||||||
|
window/size/no_focus=true
|
||||||
|
window/stretch/aspect="ignore"
|
||||||
|
window/per_pixel_transparency/allowed=true
|
||||||
|
|
||||||
[rendering]
|
[rendering]
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue