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,45 @@
extends PopochiuDialogText
@onready var left_avatar_container: PanelContainer = %LeftAvatarContainer
@onready var left_avatar: TextureRect = %LeftAvatar
@onready var right_avatar_container: PanelContainer = %RightAvatarContainer
@onready var right_avatar: TextureRect = %RightAvatar
#region Godot ######################################################################################
func _ready() -> void:
super()
# Connect to singletons signals
PopochiuUtils.c.character_spoke.connect(_update_avatar)
#endregion
#region Private ####################################################################################
func _update_avatar(chr: PopochiuCharacter, _msg := '') -> void:
if not rich_text_label.visible:
return
left_avatar_container.modulate.a = 0.0
left_avatar.texture = null
right_avatar_container.modulate.a = 0.0
right_avatar.texture = null
var char_pos: Vector2 = PopochiuUtils.get_screen_coords_for(chr).floor() / (
PopochiuUtils.e.scale if PopochiuUtils.e.settings.scale_gui else Vector2.ONE
)
if char_pos.x <= PopochiuUtils.e.half_width:
left_avatar_container.modulate.a = 1.0
left_avatar.texture = chr.get_avatar_for_emotion(chr.emotion)
else:
right_avatar_container.modulate.a = 1.0
right_avatar.texture = chr.get_avatar_for_emotion(chr.emotion)
func _set_default_size() -> void:
pass
#endregion

View file

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

View file

@ -0,0 +1,106 @@
[gd_scene load_steps=6 format=3 uid="uid://dpe2nwlyydj1d"]
[ext_resource type="Theme" uid="uid://djl1xk7jgyvpp" path="res://game/gui/resources/gui_theme.tres" id="1_63p8a"]
[ext_resource type="Script" uid="uid://cboqsfemowull" path="res://game/gui/components/dialog_text/dialog_portrait/dialog_portrait_custom.gd" id="2_4t5hq"]
[ext_resource type="Texture2D" uid="uid://bvx3a5es30q08" path="res://game/gui/components/dialog_text/images/ico_continue.png" id="3_44vf5"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_8fbbc"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_mjjs7"]
content_margin_left = 4.0
content_margin_top = 2.0
content_margin_right = 4.0
content_margin_bottom = 2.0
bg_color = Color(0, 0, 0, 0.705882)
[node name="DialogPortrait" 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_63p8a")
script = ExtResource("2_4t5hq")
[node name="PanelContainer" type="PanelContainer" parent="."]
layout_mode = 1
anchors_preset = 12
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_top = -48.0
grow_horizontal = 2
grow_vertical = 0
mouse_filter = 2
theme_override_styles/panel = SubResource("StyleBoxEmpty_8fbbc")
[node name="HBoxContainer" type="HBoxContainer" parent="PanelContainer"]
layout_mode = 2
mouse_filter = 2
theme_override_constants/separation = 2
[node name="LeftAvatarContainer" type="PanelContainer" parent="PanelContainer/HBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
mouse_filter = 2
[node name="LeftAvatar" type="TextureRect" parent="PanelContainer/HBoxContainer/LeftAvatarContainer"]
unique_name_in_owner = true
texture_filter = 1
custom_minimum_size = Vector2(48, 48)
layout_mode = 2
size_flags_vertical = 4
mouse_filter = 2
stretch_mode = 3
[node name="TextContainer" type="PanelContainer" parent="PanelContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
mouse_filter = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_mjjs7")
[node name="RichTextLabel" type="RichTextLabel" parent="PanelContainer/HBoxContainer/TextContainer"]
unique_name_in_owner = true
clip_contents = false
custom_minimum_size = Vector2(16, 16)
layout_mode = 2
size_flags_horizontal = 3
mouse_filter = 2
bbcode_enabled = true
text = "A [shake]portrait[/shake] dialog text."
scroll_active = false
meta_underlined = false
[node name="ContinueIcon" type="TextureProgressBar" parent="PanelContainer/HBoxContainer/TextContainer/RichTextLabel"]
unique_name_in_owner = true
texture_filter = 1
layout_mode = 1
anchors_preset = 3
anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -16.0
offset_top = -16.0
grow_horizontal = 0
grow_vertical = 0
mouse_filter = 2
value = 100.0
fill_mode = 2
texture_progress = ExtResource("3_44vf5")
[node name="RightAvatarContainer" type="PanelContainer" parent="PanelContainer/HBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
mouse_filter = 2
[node name="RightAvatar" type="TextureRect" parent="PanelContainer/HBoxContainer/RightAvatarContainer"]
unique_name_in_owner = true
texture_filter = 1
custom_minimum_size = Vector2(48, 48)
layout_mode = 2
size_flags_vertical = 4
mouse_filter = 2
stretch_mode = 3

View file

@ -0,0 +1 @@
extends "dialog_portrait.gd"

View file

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bvx3a5es30q08"
path="res://.godot/imported/ico_continue.png-eabcb3088fcbe3340e65e6c0e9d1d5bb.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://game/gui/components/dialog_text/images/ico_continue.png"
dest_files=["res://.godot/imported/ico_continue.png-eabcb3088fcbe3340e65e6c0e9d1d5bb.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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