started on crafting and clock panels

This commit is contained in:
Tabby 2026-01-11 16:05:12 +11:00
parent aa81f860b5
commit f58fd81ec5
20 changed files with 506 additions and 68 deletions

BIN
assets/ready_time.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 441 B

View file

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cvsibrbtuqfww"
path="res://.godot/imported/ready_time.png-1a19dfe424a34c3af9e1f97b1269d8ed.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/ready_time.png"
dest_files=["res://.godot/imported/ready_time.png-1a19dfe424a34c3af9e1f97b1269d8ed.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

BIN
assets/timer_over.pdn Normal file

Binary file not shown.

BIN
assets/timer_over.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bemb2moou1hkj"
path="res://.godot/imported/timer_over.png-736fa363f8ade887f72ebe2da09aa5f4.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/timer_over.png"
dest_files=["res://.godot/imported/timer_over.png-736fa363f8ade887f72ebe2da09aa5f4.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

BIN
assets/used_time.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 441 B

View file

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dvxtm2ahjd55h"
path="res://.godot/imported/used_time.png-b59800806aff4b1fb646c4193f5b3353.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/used_time.png"
dest_files=["res://.godot/imported/used_time.png-b59800806aff4b1fb646c4193f5b3353.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View file

@ -0,0 +1,45 @@
extends Inventory
@export var action_button : Button
#@export var no_style : StyleBox
@export var assemble_style : StyleBox
@export var assemble_style_hover : StyleBox
@export var assemble_style_pressed : StyleBox
@export var scavenge_style : StyleBox
@export var scavenge_style_hover : StyleBox
@export var scavenge_style_pressed : StyleBox
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
super()
style_scavenge()
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
super(delta)
pass
func _notification(what: int) -> void:
super(what)
if what == Node.NOTIFICATION_DRAG_END:
# check against recipies!
pass
func style_assemble():
action_button.add_theme_stylebox_override("normal",assemble_style)
action_button.add_theme_stylebox_override("hover",assemble_style_hover)
action_button.add_theme_stylebox_override("pressed",assemble_style_pressed)
func style_scavenge():
action_button.add_theme_stylebox_override("normal",scavenge_style)
action_button.add_theme_stylebox_override("hover",scavenge_style_hover)
action_button.add_theme_stylebox_override("pressed",scavenge_style_pressed)
func style_none():
action_button.remove_theme_stylebox_override("normal")
action_button.remove_theme_stylebox_override("hover")
action_button.remove_theme_stylebox_override("pressed")

View file

@ -0,0 +1 @@
uid://br4fgimf7nygr

View file

@ -0,0 +1,149 @@
[gd_scene load_steps=7 format=3 uid="uid://f06ym5ujhdsc"]
[ext_resource type="Script" uid="uid://br4fgimf7nygr" path="res://inv_system/crafting_panel.gd" id="1_441s3"]
[ext_resource type="PackedScene" uid="uid://dgqs20xf7l8c" path="res://inv_system/item_slot.tscn" id="2_h0v0h"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_h0v0h"]
content_margin_left = 0.0
content_margin_top = 0.0
content_margin_right = 0.0
content_margin_bottom = 0.0
bg_color = Color(0.0033790555, 0.44219574, 1.14551185e-05, 1)
border_width_left = 5
border_width_top = 5
border_width_right = 5
border_width_bottom = 5
border_color = Color(0, 0.9671584, 0.10068952, 1)
border_blend = true
corner_radius_top_left = 3
corner_radius_top_right = 3
corner_radius_bottom_right = 3
corner_radius_bottom_left = 3
corner_detail = 5
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_441s3"]
content_margin_left = 0.0
content_margin_top = 0.0
content_margin_right = 0.0
content_margin_bottom = 0.0
bg_color = Color(0.0033790555, 0.44219574, 1.14551185e-05, 1)
border_width_left = 5
border_width_top = 5
border_width_right = 5
border_width_bottom = 5
border_color = Color(0.6496614, 1, 0.6276887, 1)
border_blend = true
corner_radius_top_left = 3
corner_radius_top_right = 3
corner_radius_bottom_right = 3
corner_radius_bottom_left = 3
corner_detail = 5
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ytbts"]
content_margin_left = 0.0
content_margin_top = 0.0
content_margin_right = 0.0
content_margin_bottom = 0.0
bg_color = Color(0.6228256, 0, 0.13260579, 1)
border_width_left = 5
border_width_top = 5
border_width_right = 5
border_width_bottom = 5
border_color = Color(1, 0.34455475, 0.4602759, 1)
border_blend = true
corner_radius_top_left = 3
corner_radius_top_right = 3
corner_radius_bottom_right = 3
corner_radius_bottom_left = 3
corner_detail = 5
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_4h4i0"]
content_margin_left = 0.0
content_margin_top = 0.0
content_margin_right = 0.0
content_margin_bottom = 0.0
bg_color = Color(0.6228256, 0, 0.13260579, 1)
border_width_left = 5
border_width_top = 5
border_width_right = 5
border_width_bottom = 5
border_color = Color(1, 0.77051497, 0.78614175, 1)
border_blend = true
corner_radius_top_left = 3
corner_radius_top_right = 3
corner_radius_bottom_right = 3
corner_radius_bottom_left = 3
corner_detail = 5
[node name="CraftingPanel" type="PanelContainer" node_paths=PackedStringArray("action_button", "grid", "inv_label")]
offset_left = 749.0
offset_top = 89.0
offset_right = 962.0
offset_bottom = 382.0
script = ExtResource("1_441s3")
action_button = NodePath("MarginContainer/VBoxContainer/ActionButton")
assemble_style = SubResource("StyleBoxFlat_h0v0h")
assemble_style_hover = SubResource("StyleBoxFlat_441s3")
assemble_style_pressed = SubResource("StyleBoxFlat_h0v0h")
scavenge_style = SubResource("StyleBoxFlat_ytbts")
scavenge_style_hover = SubResource("StyleBoxFlat_4h4i0")
scavenge_style_pressed = SubResource("StyleBoxFlat_ytbts")
inventory_name = "Workbench"
grid = NodePath("MarginContainer/VBoxContainer/ScrollContainer/GridContainer")
inv_label = NodePath("MarginContainer/VBoxContainer/Label")
[node name="MarginContainer" type="MarginContainer" parent="."]
layout_mode = 2
theme_override_constants/margin_left = 5
theme_override_constants/margin_top = 5
theme_override_constants/margin_right = 5
theme_override_constants/margin_bottom = 5
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
layout_mode = 2
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer"]
layout_mode = 2
text = "Inventory 1"
horizontal_alignment = 1
[node name="ScrollContainer" type="ScrollContainer" parent="MarginContainer/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
[node name="GridContainer" type="GridContainer" parent="MarginContainer/VBoxContainer/ScrollContainer"]
layout_mode = 2
size_flags_vertical = 3
columns = 3
[node name="ItemSlot" parent="MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("2_h0v0h")]
layout_mode = 2
[node name="ItemSlot2" parent="MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("2_h0v0h")]
layout_mode = 2
[node name="ItemSlot3" parent="MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("2_h0v0h")]
layout_mode = 2
[node name="ItemSlot4" parent="MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("2_h0v0h")]
layout_mode = 2
[node name="ItemSlot5" parent="MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("2_h0v0h")]
layout_mode = 2
[node name="ItemSlot6" parent="MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("2_h0v0h")]
layout_mode = 2
[node name="ItemSlot7" parent="MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("2_h0v0h")]
layout_mode = 2
[node name="ItemSlot8" parent="MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("2_h0v0h")]
layout_mode = 2
[node name="ItemSlot9" parent="MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("2_h0v0h")]
layout_mode = 2
[node name="ActionButton" type="Button" parent="MarginContainer/VBoxContainer"]
custom_minimum_size = Vector2(0, 52.585)
layout_mode = 2
text = "No matching recipie"

View file

@ -0,0 +1,67 @@
[gd_scene load_steps=3 format=3 uid="uid://bar46c75dbi2t"]
[ext_resource type="Script" uid="uid://c6oycdae5wvjf" path="res://inv_system/inventory.gd" id="1_x51u7"]
[ext_resource type="PackedScene" uid="uid://dgqs20xf7l8c" path="res://inv_system/item_slot.tscn" id="2_aasfe"]
[node name="InventoryPanel" type="PanelContainer" node_paths=PackedStringArray("grid", "inv_label")]
offset_left = 51.0
offset_top = 67.0
offset_right = 403.0
offset_bottom = 549.0
script = ExtResource("1_x51u7")
inventory_name = "Your Inventory"
grid = NodePath("MarginContainer/VBoxContainer/ScrollContainer/GridContainer")
inv_label = NodePath("MarginContainer/VBoxContainer/Label")
[node name="MarginContainer" type="MarginContainer" parent="."]
layout_mode = 2
theme_override_constants/margin_left = 5
theme_override_constants/margin_top = 5
theme_override_constants/margin_right = 5
theme_override_constants/margin_bottom = 5
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
layout_mode = 2
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer"]
layout_mode = 2
text = "Inventory 1"
[node name="ScrollContainer" type="ScrollContainer" parent="MarginContainer/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
[node name="GridContainer" type="GridContainer" parent="MarginContainer/VBoxContainer/ScrollContainer"]
layout_mode = 2
size_flags_vertical = 3
columns = 5
[node name="ItemSlot" parent="MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("2_aasfe")]
layout_mode = 2
[node name="ItemSlot2" parent="MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("2_aasfe")]
layout_mode = 2
[node name="ItemSlot3" parent="MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("2_aasfe")]
layout_mode = 2
[node name="ItemSlot4" parent="MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("2_aasfe")]
layout_mode = 2
[node name="ItemSlot5" parent="MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("2_aasfe")]
layout_mode = 2
[node name="ItemSlot6" parent="MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("2_aasfe")]
layout_mode = 2
[node name="ItemSlot7" parent="MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("2_aasfe")]
layout_mode = 2
[node name="ItemSlot8" parent="MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("2_aasfe")]
layout_mode = 2
[node name="ItemSlot9" parent="MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("2_aasfe")]
layout_mode = 2
[node name="ItemSlot10" parent="MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("2_aasfe")]
layout_mode = 2

View file

@ -15,7 +15,7 @@ func update_ui():
return
icon.texture = item.icon
tooltip_text = item.item_name
#tooltip_text = item.item_name
label.text = item.value
@ -28,7 +28,8 @@ func _get_drag_data(at_position: Vector2) -> Variant:
c.add_child(preview)
preview.position -= Vector2(32,32)
preview.self_modulate = Color.TRANSPARENT
c.modulate = Color(c.modulate,0.5)
c.z_index = 3
c.modulate = Color(c.modulate,0.6)
set_drag_preview(c)
icon.hide()
return self
@ -47,7 +48,7 @@ func _drop_data(at_position: Vector2, data: Variant) -> void:
func _on_mouse_entered() -> void:
print("im real?")
#print("im real?")
if item:
Tooltip.show_tip(item.item_name)
pass # Replace with function body.

View file

@ -0,0 +1,19 @@
extends Node
@export var inventory_panel : Inventory
@export var button : Button
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
button.text = "Show Inventory" if !inventory_panel.visible else "Hide Inventory"
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func _on_button_pressed() -> void:
inventory_panel.visible = !inventory_panel.visible
button.text = "Show Inventory" if !inventory_panel.visible else "Hide Inventory"

View file

@ -0,0 +1 @@
uid://jxkjnscuxcyi

View file

@ -0,0 +1,36 @@
[gd_scene load_steps=3 format=3 uid="uid://bkhg56q71vsjv"]
[ext_resource type="Script" uid="uid://jxkjnscuxcyi" path="res://inv_system/player_inventory.gd" id="1_vk2kx"]
[ext_resource type="PackedScene" uid="uid://bar46c75dbi2t" path="res://inv_system/inventory_panel.tscn" id="2_hk4hx"]
[node name="PlayerInventory" type="Control" node_paths=PackedStringArray("inventory_panel", "button")]
z_index = 2
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
script = ExtResource("1_vk2kx")
inventory_panel = NodePath("InventoryPanel")
button = NodePath("Button")
[node name="Button" type="Button" parent="."]
layout_mode = 1
anchors_preset = 2
anchor_top = 1.0
anchor_bottom = 1.0
offset_top = -31.0
offset_right = 129.0
grow_vertical = 0
text = "Show Inventory"
[node name="InventoryPanel" parent="." instance=ExtResource("2_hk4hx")]
layout_mode = 0
offset_left = 67.0
offset_top = 79.0
offset_right = 419.0
offset_bottom = 561.0
[connection signal="pressed" from="Button" to="." method="_on_button_pressed"]

View file

@ -18,6 +18,8 @@ config/icon="res://icon.svg"
[autoload]
Tooltip="*res://tooltip.tscn"
PlayerInventory="*res://inv_system/player_inventory.tscn"
Clock="*res://time_system/clock.tscn"
[rendering]

View file

@ -12,94 +12,33 @@
[ext_resource type="PackedScene" uid="uid://dgqs20xf7l8c" path="res://inv_system/item_slot.tscn" id="7_xersf"]
[node name="Control" type="Control" node_paths=PackedStringArray("bin_inventory", "loot_button")]
z_index = -1
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
script = ExtResource("1_vbegm")
bin_inventory = NodePath("BinPanel")
loot_button = NodePath("LootButton")
loot_pool = Array[ExtResource("2_ehkex")]([ExtResource("3_ykrsh"), ExtResource("5_g14j6"), ExtResource("5_00tp4"), ExtResource("6_77dp3"), ExtResource("7_5tkv4")])
[node name="TextureRect" type="TextureRect" parent="."]
z_index = -3
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
texture = ExtResource("1_g14j6")
expand_mode = 3
[node name="InventoryPanel" type="PanelContainer" parent="." node_paths=PackedStringArray("grid", "inv_label")]
layout_mode = 0
offset_left = 51.0
offset_top = 67.0
offset_right = 403.0
offset_bottom = 549.0
script = ExtResource("1_6uqi0")
inventory_name = "Your Items"
grid = NodePath("MarginContainer/VBoxContainer/ScrollContainer/GridContainer")
inv_label = NodePath("MarginContainer/VBoxContainer/Label")
[node name="MarginContainer" type="MarginContainer" parent="InventoryPanel"]
layout_mode = 2
theme_override_constants/margin_left = 5
theme_override_constants/margin_top = 5
theme_override_constants/margin_right = 5
theme_override_constants/margin_bottom = 5
[node name="VBoxContainer" type="VBoxContainer" parent="InventoryPanel/MarginContainer"]
layout_mode = 2
[node name="Label" type="Label" parent="InventoryPanel/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "Inventory 1"
[node name="ScrollContainer" type="ScrollContainer" parent="InventoryPanel/MarginContainer/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
[node name="GridContainer" type="GridContainer" parent="InventoryPanel/MarginContainer/VBoxContainer/ScrollContainer"]
layout_mode = 2
size_flags_vertical = 3
columns = 5
[node name="ItemSlot" parent="InventoryPanel/MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("7_xersf")]
layout_mode = 2
[node name="ItemSlot2" parent="InventoryPanel/MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("7_xersf")]
layout_mode = 2
[node name="ItemSlot3" parent="InventoryPanel/MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("7_xersf")]
layout_mode = 2
[node name="ItemSlot4" parent="InventoryPanel/MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("7_xersf")]
layout_mode = 2
[node name="ItemSlot5" parent="InventoryPanel/MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("7_xersf")]
layout_mode = 2
[node name="ItemSlot6" parent="InventoryPanel/MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("7_xersf")]
layout_mode = 2
[node name="ItemSlot7" parent="InventoryPanel/MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("7_xersf")]
layout_mode = 2
[node name="ItemSlot8" parent="InventoryPanel/MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("7_xersf")]
layout_mode = 2
[node name="ItemSlot9" parent="InventoryPanel/MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("7_xersf")]
layout_mode = 2
[node name="ItemSlot10" parent="InventoryPanel/MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("7_xersf")]
layout_mode = 2
[node name="BinPanel" type="PanelContainer" parent="." node_paths=PackedStringArray("grid", "inv_label")]
visible = false
z_index = 2
layout_mode = 0
offset_left = 714.0
offset_top = 386.0

55
time_system/clock.tscn Normal file
View file

@ -0,0 +1,55 @@
[gd_scene load_steps=5 format=3 uid="uid://dpa3yvdrddtsh"]
[ext_resource type="Texture2D" uid="uid://cvsibrbtuqfww" path="res://assets/ready_time.png" id="1_chnjs"]
[ext_resource type="Texture2D" uid="uid://bemb2moou1hkj" path="res://assets/timer_over.png" id="2_m6rn1"]
[ext_resource type="Texture2D" uid="uid://dvxtm2ahjd55h" path="res://assets/used_time.png" id="3_uyb5s"]
[sub_resource type="LabelSettings" id="LabelSettings_r3ygl"]
font_size = 32
[node name="Clock" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="PanelContainer" type="PanelContainer" parent="."]
layout_mode = 1
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -20.0
offset_right = 20.0
offset_bottom = 40.0
grow_horizontal = 2
[node name="HBoxContainer" type="HBoxContainer" parent="PanelContainer"]
layout_mode = 2
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer/HBoxContainer"]
layout_mode = 2
alignment = 1
[node name="Label" type="Label" parent="PanelContainer/HBoxContainer/VBoxContainer"]
layout_mode = 2
text = "7"
label_settings = SubResource("LabelSettings_r3ygl")
horizontal_alignment = 1
[node name="Label2" type="Label" parent="PanelContainer/HBoxContainer/VBoxContainer"]
layout_mode = 2
text = "Days Left"
[node name="TextureProgressBar" type="TextureProgressBar" parent="PanelContainer/HBoxContainer"]
custom_minimum_size = Vector2(150, 73)
layout_mode = 2
fill_mode = 4
radial_initial_angle = 270.0
radial_fill_degrees = 180.0
radial_center_offset = Vector2(0, 41.055)
nine_patch_stretch = true
texture_under = ExtResource("1_chnjs")
texture_over = ExtResource("2_m6rn1")
texture_progress = ExtResource("3_uyb5s")

View file

@ -4,6 +4,7 @@ extends PanelContainer
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
hide()
pass # Replace with function body.
@ -13,6 +14,7 @@ func _process(delta: float) -> void:
func show_tip(text : String):
tooltip_label.text = text
reset_size()
show()
func hide_tip():

View file

@ -20,6 +20,7 @@ corner_radius_bottom_left = 3
[sub_resource type="LabelSettings" id="LabelSettings_oxk8h"]
[node name="Tooltip" type="PanelContainer" node_paths=PackedStringArray("tooltip_label")]
z_index = 3
offset_right = 95.0
offset_bottom = 31.0
size_flags_horizontal = 0