improved Twitch connection menu experience

This commit is contained in:
2024-04-23 05:46:39 -05:00
parent d3beca8014
commit 8e01e9cb9b
10 changed files with 220 additions and 80 deletions

17
game.cs
View File

@@ -6,6 +6,14 @@ using System.Linq;
public partial class game : Control
{
private settings_popup _SettingsPopup;
private settings_popup SettingsPopup
{ get
{
_SettingsPopup ??= GetNode<settings_popup>("%SettingsPopup");
return _SettingsPopup;
}
}
[Export]
private Vector2 _CardSize = new(200, 200);
public Vector2 CardSize
@@ -59,7 +67,14 @@ public partial class game : Control
{
if (@event.IsActionPressed("OpenMenu"))
{
GetNode<settings_popup>("%SettingsPopup").Visible = true;
if (SettingsPopup.Visible)
{
SettingsPopup.ClosePopup();
}
else
{
SettingsPopup.ShowPopup();
}
GetViewport().SetInputAsHandled();
}
}