2026-02-23 18:38:03 -06:00
|
|
|
extends Control
|
|
|
|
|
|
|
|
|
|
@onready var controls: VBoxContainer = %Controls
|
2026-02-24 03:15:57 -06:00
|
|
|
@onready var ui_bar: HBoxContainer = %UIBar
|
2026-02-23 18:38:03 -06:00
|
|
|
@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
|