tested version with most of the final functionality. Still a few known issues, like dragging to a row that extends to multiple lines

This commit is contained in:
2024-04-24 18:18:03 -05:00
parent f67885d217
commit e25e7da40f
25 changed files with 568 additions and 56 deletions

View File

@@ -34,6 +34,8 @@ public partial class CommandHandler : Node
// Called when the node enters the scene tree for the first time.
public override void _Ready()
{
//force initialization of Deferer in main thread
_ = Deferer;
Settings = GetNode<Settings>("/root/Settings");
Game = GetNode<game>("/root/Game");
GetNode<TwitchChatWatcher>("/root/TwitchChatWatcher").IncomingCommand
@@ -51,6 +53,7 @@ public partial class CommandHandler : Node
private void IncomingCommand(Command command)
{
GD.Print(command.GetArgs().Remaining());
if (!Settings.IsUserAuthorized(command.User, command.IsStreamer,
command.IsModerator))
return;
@@ -167,7 +170,6 @@ public partial class CommandHandler : Node
var rowId = args.Pop();
var colorStr = args.Pop();
var color = Color.FromString(colorStr, new Color(0, 0, 0, 0));
GD.Print($"Recoloring row to {color}");
if (color.IsEqualApprox(new Color(0, 0, 0, 0)))
throw new Exception($"invalid color {colorStr}");
Game.RecolorRow(rowId, color);
@@ -195,7 +197,6 @@ public partial class CommandHandler : Node
_ => throw new Exception($"Unrecognized {nameof(StretchMode)}"),
};
}
GD.Print($"Stretch mode: {mode}");
var uri = new Uri(url);
GD.Print("Starting image download");
var resp = await Client.GetAsync(uri);