mirror of
https://codeberg.org/Ikatono/TierMaker.git
synced 2025-10-28 20:45:35 -05:00
forgot to commit for a while
This commit is contained in:
35
settings_popup.cs
Normal file
35
settings_popup.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user