Updated UserEntry
Re-Enabled shoutout to full functionality
This commit is contained in:
parent
33b5e826bd
commit
3d2514b517
2 changed files with 9 additions and 1 deletions
|
|
@ -7,6 +7,7 @@ var tw_hidden: Tween
|
|||
var is_expanded: bool = false
|
||||
|
||||
var is_profile_picture_loaded: bool = false
|
||||
const SHOUTOUT_ALERT_SCENE := preload("res://UI/Shoutouts/shoutout.tscn")
|
||||
|
||||
signal user_selected(chatter: Chatter)
|
||||
|
||||
|
|
@ -20,11 +21,18 @@ func _ready() -> void:
|
|||
%ScreenNotifer.rect = get_rect()
|
||||
%ScreenNotifer.screen_entered.connect(check_update_profile_picture)
|
||||
%User.pressed.connect(user_selected.emit.bind(chatter))
|
||||
%Shoutout.pressed.connect(func(): Globals.twitcher.shoutout(chatter.user))
|
||||
%Shoutout.pressed.connect(_handle_shoutout) #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 _handle_shoutout() -> void:
|
||||
Globals.twitcher.shoutout(chatter.user)
|
||||
Globals.twitcher.send_message(Globals.settings.shoutout_message.format(chatter.user))
|
||||
var alrt = SHOUTOUT_ALERT_SCENE.instantiate()
|
||||
alrt.chatter = chatter
|
||||
EventManager.add_alert(alrt)
|
||||
|
||||
func _update_tooltips() -> void:
|
||||
for node: Control in [%Shoutout, %Promote, %Refresh, %Raid, %Delete]:
|
||||
node.tooltip_text = node.tooltip_text % chatter.user.display_name
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue