mirror of
https://codeberg.org/StreamGraph/StreamGraph.git
synced 2024-11-13 19:49:55 +01:00
b55a462945
After months of work and over a hundred commits on this repo alone (not to mention the old, half-working repos on GitHub), StreamGraph is finally ready to be shown to the public, even if in an incomplete state. This PR is a culmination of numerous design discussions, re-writes, and hours spent by both @Eroax and myself. Reviewed-on: https://codeberg.org/Eroax/StreamGraph/pulls/18 Co-authored-by: Lera Elvoé <yagich@poto.cafe> Co-committed-by: Lera Elvoé <yagich@poto.cafe>
33 lines
642 B
GDScript
33 lines
642 B
GDScript
extends HBoxContainer
|
|
|
|
var channel : String
|
|
|
|
func _ready():
|
|
|
|
%Channel_Input.text_changed.connect(update_channel)
|
|
%Join_Chat.pressed.connect(join_chat)
|
|
%Start_Chat_Connection.pressed.connect(start_chat_connection)
|
|
|
|
%Chat_Msg.text_submitted.connect(send_chat)
|
|
%Send_Button.pressed.connect(func(): send_chat(%Chat_Msg.text))
|
|
|
|
|
|
func update_channel(new_channel):
|
|
|
|
channel = new_channel
|
|
|
|
|
|
func start_chat_connection():
|
|
|
|
%Twitch_Connection.setup_chat_connection(channel)
|
|
|
|
|
|
func join_chat():
|
|
|
|
%Twitch_Connection.join_channel(channel)
|
|
|
|
|
|
func send_chat(chat : String):
|
|
|
|
%Twitch_Connection.send_chat_to_channel(chat, %Channel.text)
|
|
|