StreamOverlay/main_win.gd
Mario Steele 583f0fbe38 Refactoring UI
Refactoring Main UI.
2026-02-24 03:15:57 -06:00

34 lines
1 KiB
GDScript

extends Control
@onready var controls: VBoxContainer = %Controls
@onready var ui_bar: HBoxContainer = %UIBar
@onready var auth_twitch: Button = %AuthTwitch
@onready var auth_bot: Button = %AuthBot
@onready var bot_hello: Button = %BotHello
@onready var chat_history: ScrollContainer = %ChatHistory
@onready var chat_list: VBoxContainer = %ChatList
@onready var auto_connect: CheckBox = %AutoConnect
@onready var exit_overlay: Button = %ExitOverlay
#region Twitch Nodes
@onready var twitcher: TwitcherExtended = $TwitcherExtended
#endregion
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
Globals.twitcher = twitcher
var res := twitcher.load_streamer_token()
if res == TwitcherExtended.AuthStatus.UNAUTHORIZED:
return
func _handle_twitch_auth() -> void:
await twitcher.setup_streamer()
if twitcher.is_streamer_authed():
auth_twitch.disabled = true
func _handle_bot_auth() -> void:
await twitcher.setup_chatbot()
if twitcher.is_chatbot_authed():
auth_bot.disabled = true