Updated UserEntry

Added theme type variations for UserEntry.
Added custom minimum size for User button, ensure that Text Overrun
behavior is set to use ellipses when to much text is set for the button.
Added Tooltip texts for Shoutout, Promote, Refresh Twitch Data, Raid and
Delete from database.
Added connection of ButtonMenu being pressed to toggle menu options.
Added support function to update all tooltips to include the Streamer's
Display name.
This commit is contained in:
Mario Steele 2026-03-09 03:08:01 -05:00
parent c05fe30b8c
commit 9bbc1111d8
2 changed files with 14 additions and 0 deletions

View file

@ -22,6 +22,12 @@ func _ready() -> void:
%User.pressed.connect(user_selected.emit.bind(chatter))
%Shoutout.pressed.connect(func(): Globals.twitcher.shoutout(chatter.user))
%Promote.pressed.connect(func(): Globals.twitcher.send_message(chatter.promo_msg))
%ButtonMenu.pressed.connect(func(): toggle_buttons(!is_expanded))
_update_tooltips()
func _update_tooltips() -> void:
for node: Control in [%Shoutout, %Promote, %Refresh, %Raid, %Delete]:
node.tooltip_text = node.tooltip_text % chatter.user.display_name
func update() -> void:
if not chatter:

View file

@ -26,6 +26,7 @@ corner_detail = 5
[node name="UserEntry" type="PanelContainer" unique_id=1215925059]
offset_right = 40.0
offset_bottom = 40.0
theme_type_variation = &"Entry"
script = ExtResource("1_xsfty")
[node name="HBoxContainer" type="HBoxContainer" parent="." unique_id=582266053]
@ -62,9 +63,11 @@ theme_type_variation = &"BlankButton"
[node name="User" type="Button" parent="HBoxContainer" unique_id=565524419]
unique_name_in_owner = true
custom_minimum_size = Vector2(130, 0)
layout_mode = 2
size_flags_horizontal = 3
text = "Falinere"
text_overrun_behavior = 3
[node name="LiveStatus" type="ColorRect" parent="HBoxContainer/User" unique_id=1459190091]
unique_name_in_owner = true
@ -81,6 +84,7 @@ color = Color(0.3647059, 1, 0.44313726, 0.3764706)
unique_name_in_owner = true
custom_minimum_size = Vector2(32, 32)
layout_mode = 2
tooltip_text = "Shoutout %s"
icon = ExtResource("3_sck47")
icon_alignment = 1
expand_icon = true
@ -97,6 +101,7 @@ layout_mode = 2
unique_name_in_owner = true
custom_minimum_size = Vector2(32, 32)
layout_mode = 2
tooltip_text = "Promote %s"
icon = ExtResource("4_0jtnn")
icon_alignment = 1
expand_icon = true
@ -105,6 +110,7 @@ expand_icon = true
unique_name_in_owner = true
custom_minimum_size = Vector2(32, 32)
layout_mode = 2
tooltip_text = "Refresh %s Twitch Data"
icon = ExtResource("5_xsfty")
icon_alignment = 1
expand_icon = true
@ -114,6 +120,7 @@ unique_name_in_owner = true
modulate = Color(0.6392157, 0.38431373, 0.84313726, 1)
custom_minimum_size = Vector2(32, 32)
layout_mode = 2
tooltip_text = "Raid %s channel"
icon = ExtResource("6_mi6bx")
icon_alignment = 1
expand_icon = true
@ -123,6 +130,7 @@ unique_name_in_owner = true
modulate = Color(1, 0, 0, 1)
custom_minimum_size = Vector2(32, 32)
layout_mode = 2
tooltip_text = "Delete %s from Chatter Database"
icon = ExtResource("9_k1oax")
icon_alignment = 1
expand_icon = true