Created Users Panel
This is the Tab in the main Settings dialog to show all interaction with saved users in the database.
This commit is contained in:
parent
f6c2def426
commit
cffe7c9ef0
3 changed files with 76 additions and 0 deletions
22
UI/Controls/users.gd
Normal file
22
UI/Controls/users.gd
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
extends PanelContainer
|
||||||
|
|
||||||
|
@onready var itu := %InternalTwitchUserInfo
|
||||||
|
@onready var iul := %InternalUserLive
|
||||||
|
|
||||||
|
# Called when the node enters the scene tree for the first time.
|
||||||
|
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)
|
||||||
|
|
||||||
|
|
||||||
|
func _handle_user_selected(user: Chatter) -> void:
|
||||||
|
itu.chatter = user
|
||||||
|
iul.chatter = user
|
||||||
|
%Tabs.current_tab = 0
|
||||||
1
UI/Controls/users.gd.uid
Normal file
1
UI/Controls/users.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://ykgacitkm8qw
|
||||||
53
UI/Controls/users.tscn
Normal file
53
UI/Controls/users.tscn
Normal file
|
|
@ -0,0 +1,53 @@
|
||||||
|
[gd_scene format=3 uid="uid://b7ubexvohw507"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://ykgacitkm8qw" path="res://UI/Controls/users.gd" id="1_8sme5"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://cdm7rbq5547xp" path="res://UI/Controls/user_list.tscn" id="1_wmtpy"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://2ifvkmqd0q3i" path="res://UI/Controls/search_twitch_user.tscn" id="2_hl8i0"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://d3fhwrt28r08x" path="res://UI/Controls/internal_twitch_user_info.tscn" id="4_jqw2j"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://bipoye4ww4ua6" path="res://UI/Controls/internal_user_live.tscn" id="5_8sme5"]
|
||||||
|
|
||||||
|
[node name="Users" type="PanelContainer" unique_id=823449222]
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
script = ExtResource("1_8sme5")
|
||||||
|
metadata/_tab_index = 1
|
||||||
|
|
||||||
|
[node name="HSplitContainer" type="HSplitContainer" parent="." unique_id=1436900852]
|
||||||
|
layout_mode = 2
|
||||||
|
split_offsets = PackedInt32Array(400)
|
||||||
|
split_offset = 400
|
||||||
|
|
||||||
|
[node name="UserList" parent="HSplitContainer" unique_id=1448466108 instance=ExtResource("1_wmtpy")]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="UserManager" type="PanelContainer" parent="HSplitContainer" unique_id=1405139410]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="VBoxContainer" type="VBoxContainer" parent="HSplitContainer/UserManager" unique_id=558998019]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="SearchTwitchUser" parent="HSplitContainer/UserManager/VBoxContainer" unique_id=83637811 instance=ExtResource("2_hl8i0")]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="HSeparator" type="HSeparator" parent="HSplitContainer/UserManager/VBoxContainer" unique_id=195418375]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="Tabs" type="TabContainer" parent="HSplitContainer/UserManager/VBoxContainer" unique_id=140135258]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(0, 300)
|
||||||
|
layout_mode = 2
|
||||||
|
current_tab = 0
|
||||||
|
|
||||||
|
[node name="InternalTwitchUserInfo" parent="HSplitContainer/UserManager/VBoxContainer/Tabs" unique_id=1986869556 instance=ExtResource("4_jqw2j")]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="InternalUserLive" parent="HSplitContainer/UserManager/VBoxContainer/Tabs" unique_id=17956466 instance=ExtResource("5_8sme5")]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
visible = false
|
||||||
|
layout_mode = 2
|
||||||
Loading…
Add table
Add a link
Reference in a new issue