Updated Users
Renamed ClosePanel to Clear. Added handle clear for the Clear button. Removed set_tab_names() as Godot now allows setting a tab child's title in the editor. Added hiding and showing of the SearchTwitchUser panel when selecting a user / clearing a user.
This commit is contained in:
parent
0a98c9310f
commit
c05fe30b8c
2 changed files with 32 additions and 10 deletions
|
|
@ -8,15 +8,15 @@ func _ready() -> void:
|
|||
%SearchTwitchUser.users_updated.connect(%UserList.update_list)
|
||||
%UserList.populate_list()
|
||||
%UserList.user_selected.connect(_handle_user_selected)
|
||||
set_tab_names()
|
||||
|
||||
func set_tab_names() -> void:
|
||||
for pnl in %Tabs.get_children():
|
||||
var title := pnl.name.trim_prefix("Internal").capitalize()
|
||||
%Tabs.set_tab_title(pnl.get_index(), title)
|
||||
|
||||
%Clear.pressed.connect(_handle_clear)
|
||||
|
||||
func _handle_user_selected(user: Chatter) -> void:
|
||||
itu.chatter = user
|
||||
iul.chatter = user
|
||||
%Tabs.current_tab = 0
|
||||
%SearchTwitchUser.hide()
|
||||
|
||||
func _handle_clear() -> void:
|
||||
itu.chatter = null
|
||||
iul.chatter = null
|
||||
%SearchTwitchUser.show()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue