First commit 🎉

This commit is contained in:
Tony Bark 2025-07-17 01:49:18 -04:00
commit 43ea213f9b
728 changed files with 37080 additions and 0 deletions

View file

@ -0,0 +1,39 @@
extends Control
class_name PopochiuHoverText
@export var hide_during_dialogs := false
@onready var label: RichTextLabel = $RichTextLabel
#region Godot ######################################################################################
func _ready() -> void:
label.text = ""
# Connect to autoloads' signals
PopochiuUtils.g.hover_text_shown.connect(_show_text)
PopochiuUtils.g.dialog_line_started.connect(_on_dialog_line_started)
PopochiuUtils.g.dialog_line_finished.connect(_on_dialog_line_finished)
#endregion
#region Virtual ####################################################################################
func _show_text(txt := "") -> void:
label.text = "[center]%s[/center]" % txt
#endregion
#region Private ####################################################################################
func _on_dialog_line_started() -> void:
if hide_during_dialogs:
hide()
func _on_dialog_line_finished() -> void:
if hide_during_dialogs:
show()
#endregion

View file

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

View file

@ -0,0 +1,29 @@
[gd_scene load_steps=3 format=3 uid="uid://esorelppu4hw"]
[ext_resource type="Theme" uid="uid://dpequqav4rjaf" path="res://addons/popochiu/engine/objects/gui/resources/base_gui_theme.tres" id="1_s7kd8"]
[ext_resource type="Script" path="res://addons/popochiu/engine/objects/gui/components/hover_text/hover_text.gd" id="2_r2ckj"]
[node name="HoverText" type="Control" groups=["popochiu_gui_component"]]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
theme = ExtResource("1_s7kd8")
script = ExtResource("2_r2ckj")
[node name="RichTextLabel" type="RichTextLabel" parent="."]
layout_mode = 1
anchors_preset = 10
anchor_right = 1.0
offset_bottom = 12.0
grow_horizontal = 2
mouse_filter = 2
theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
theme_override_constants/outline_size = 4
bbcode_enabled = true
text = "[center]text for hovered objects[/center]"
fit_content = true
scroll_active = false