mirror of
https://codeberg.org/Ikatono/TierMaker.git
synced 2025-10-28 20:45:35 -05:00
improved Twitch connection menu experience
This commit is contained in:
17
game.cs
17
game.cs
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user