Updated MainWin
Removed old UI, added new Floating Menu.
This commit is contained in:
parent
9b90f92aa6
commit
c8d4c6391b
2 changed files with 26 additions and 18 deletions
21
main_win.gd
21
main_win.gd
|
|
@ -1,14 +1,6 @@
|
||||||
extends Control
|
extends Control
|
||||||
|
|
||||||
@onready var controls: VBoxContainer = %Controls
|
@onready var floating_menu: GDFloatingMenu = %FloatingMenu
|
||||||
@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
|
#region Twitch Nodes
|
||||||
|
|
@ -23,12 +15,15 @@ func _ready() -> void:
|
||||||
if res == TwitcherExtended.AuthStatus.UNAUTHORIZED:
|
if res == TwitcherExtended.AuthStatus.UNAUTHORIZED:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
Globals.add_to_passthrough_exception(floating_menu)
|
||||||
|
Globals.enable_mouse_passthrough()
|
||||||
|
|
||||||
func _handle_twitch_auth() -> void:
|
func _handle_twitch_auth() -> void:
|
||||||
await twitcher.setup_streamer()
|
await twitcher.setup_streamer()
|
||||||
if twitcher.is_streamer_authed():
|
#if twitcher.is_streamer_authed():
|
||||||
auth_twitch.disabled = true
|
#auth_twitch.disabled = true
|
||||||
|
|
||||||
func _handle_bot_auth() -> void:
|
func _handle_bot_auth() -> void:
|
||||||
await twitcher.setup_chatbot()
|
await twitcher.setup_chatbot()
|
||||||
if twitcher.is_chatbot_authed():
|
#if twitcher.is_chatbot_authed():
|
||||||
auth_bot.disabled = true
|
#auth_bot.disabled = true
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@
|
||||||
[ext_resource type="PackedScene" uid="uid://djdxpwrmlrsp8" path="res://ChatAvatars/CatSlimes/cat_world.tscn" id="23_7nx26"]
|
[ext_resource type="PackedScene" uid="uid://djdxpwrmlrsp8" path="res://ChatAvatars/CatSlimes/cat_world.tscn" id="23_7nx26"]
|
||||||
[ext_resource type="Script" uid="uid://cv06lthuq2c2o" path="res://general_commands.gd" id="24_dr7ot"]
|
[ext_resource type="Script" uid="uid://cv06lthuq2c2o" path="res://general_commands.gd" id="24_dr7ot"]
|
||||||
[ext_resource type="Script" uid="uid://bmluckfvgm1c2" path="res://addons/twitcher/chat/twitch_command.gd" id="24_l81bt"]
|
[ext_resource type="Script" uid="uid://bmluckfvgm1c2" path="res://addons/twitcher/chat/twitch_command.gd" id="24_l81bt"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://bndydwe6rrb6p" path="res://UI/floating_menu.tscn" id="26_m7rpr"]
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_m7rpr"]
|
[sub_resource type="Resource" id="Resource_m7rpr"]
|
||||||
script = ExtResource("14_dr7ot")
|
script = ExtResource("14_dr7ot")
|
||||||
|
|
@ -33,7 +34,7 @@ script = ExtResource("14_dr7ot")
|
||||||
script = ExtResource("11_o2vln")
|
script = ExtResource("11_o2vln")
|
||||||
_identifier = "Bot-Token"
|
_identifier = "Bot-Token"
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_dr7ot"]
|
[sub_resource type="Resource" id="Resource_vifpv"]
|
||||||
script = ExtResource("13_7nx26")
|
script = ExtResource("13_7nx26")
|
||||||
token_url = "https://id.twitch.tv/oauth2/token"
|
token_url = "https://id.twitch.tv/oauth2/token"
|
||||||
authorization_url = "https://id.twitch.tv/oauth2/authorize"
|
authorization_url = "https://id.twitch.tv/oauth2/authorize"
|
||||||
|
|
@ -119,23 +120,23 @@ bot_token = SubResource("Resource_lpeoe")
|
||||||
[node name="BotApi" type="Node" parent="TwitcherExtended/Bot" unique_id=357061728]
|
[node name="BotApi" type="Node" parent="TwitcherExtended/Bot" unique_id=357061728]
|
||||||
script = ExtResource("12_1ed2e")
|
script = ExtResource("12_1ed2e")
|
||||||
token = SubResource("Resource_lpeoe")
|
token = SubResource("Resource_lpeoe")
|
||||||
oauth_setting = SubResource("Resource_dr7ot")
|
oauth_setting = SubResource("Resource_vifpv")
|
||||||
|
|
||||||
[node name="BotAuth" type="Node" parent="TwitcherExtended/Bot" unique_id=1765548387]
|
[node name="BotAuth" type="Node" parent="TwitcherExtended/Bot" unique_id=1765548387]
|
||||||
script = ExtResource("14_l81bt")
|
script = ExtResource("14_l81bt")
|
||||||
oauth_setting = SubResource("Resource_dr7ot")
|
oauth_setting = SubResource("Resource_vifpv")
|
||||||
token = SubResource("Resource_lpeoe")
|
token = SubResource("Resource_lpeoe")
|
||||||
scopes = ExtResource("15_dr7ot")
|
scopes = ExtResource("15_dr7ot")
|
||||||
|
|
||||||
[node name="OAuth" type="Node" parent="TwitcherExtended/Bot/BotAuth" unique_id=753392258 node_paths=PackedStringArray("token_handler")]
|
[node name="OAuth" type="Node" parent="TwitcherExtended/Bot/BotAuth" unique_id=753392258 node_paths=PackedStringArray("token_handler")]
|
||||||
script = ExtResource("16_m7rpr")
|
script = ExtResource("16_m7rpr")
|
||||||
oauth_setting = SubResource("Resource_dr7ot")
|
oauth_setting = SubResource("Resource_vifpv")
|
||||||
scopes = ExtResource("15_dr7ot")
|
scopes = ExtResource("15_dr7ot")
|
||||||
token_handler = NodePath("../TokenHandler")
|
token_handler = NodePath("../TokenHandler")
|
||||||
|
|
||||||
[node name="TokenHandler" type="Node" parent="TwitcherExtended/Bot/BotAuth" unique_id=1838561754]
|
[node name="TokenHandler" type="Node" parent="TwitcherExtended/Bot/BotAuth" unique_id=1838561754]
|
||||||
script = ExtResource("17_lpeoe")
|
script = ExtResource("17_lpeoe")
|
||||||
oauth_setting = SubResource("Resource_dr7ot")
|
oauth_setting = SubResource("Resource_vifpv")
|
||||||
token = SubResource("Resource_lpeoe")
|
token = SubResource("Resource_lpeoe")
|
||||||
|
|
||||||
[node name="ChatbotAuth" type="Node" parent="TwitcherExtended" unique_id=1435619386]
|
[node name="ChatbotAuth" type="Node" parent="TwitcherExtended" unique_id=1435619386]
|
||||||
|
|
@ -175,3 +176,15 @@ script = ExtResource("24_l81bt")
|
||||||
command = "test"
|
command = "test"
|
||||||
description = "Test command to see if everythingis working."
|
description = "Test command to see if everythingis working."
|
||||||
metadata/_custom_type_script = "uid://bmluckfvgm1c2"
|
metadata/_custom_type_script = "uid://bmluckfvgm1c2"
|
||||||
|
|
||||||
|
[node name="FloatingMenu" parent="." unique_id=56646671 instance=ExtResource("26_m7rpr")]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 0
|
||||||
|
anchors_preset = 0
|
||||||
|
anchor_left = 0.0
|
||||||
|
anchor_right = 0.0
|
||||||
|
offset_left = 0.0
|
||||||
|
offset_top = 0.0
|
||||||
|
offset_right = 64.0
|
||||||
|
offset_bottom = 64.0
|
||||||
|
grow_horizontal = 1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue