forgot to commit for a while

This commit is contained in:
2024-04-21 15:43:32 -05:00
parent 885bc5ad6e
commit 3ac7bf33c4
18 changed files with 1607 additions and 38 deletions

35
settings_popup.cs Normal file
View File

@@ -0,0 +1,35 @@
using Godot;
using System;
using System.Linq;
using System.Net.NetworkInformation;
public partial class settings_popup : Popup
{
// Called when the node enters the scene tree for the first time.
public override void _Ready()
{
}
// Called every frame. 'delta' is the elapsed time since the previous frame.
public override void _Process(double delta)
{
}
public void _on_cancel_button_pressed()
{
Hide();
}
public void _on_ok_button_pressed()
{
var settings = GetNode<Settings>("/root/Settings");
settings.AllowModerators = GetNode<CheckBox>("%CheckBoxModerator").ButtonPressed;
settings.SetUserLists(GetNode<TextEdit>("%WhiteListEdit").Text.Split('\n',
StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries),
GetNode<TextEdit>("%BlackListEdit").Text.Split('\n',
StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries));
var tcw = GetNode<TwitchChatWatcher>("/root/TwitchChatWatcher");
tcw.ConnectAsync().RunSynchronously();
tcw.Authenticate().RunSynchronously();
tcw.JoinChannel(GetNode<LineEdit>("%ChannelNameEdit").Text).RunSynchronously();
Hide();
}
}