functional card/row edit and drag

This commit is contained in:
2024-04-23 23:31:42 -05:00
parent 8e01e9cb9b
commit 56dcbb62af
29 changed files with 674 additions and 48 deletions

View File

@@ -19,6 +19,10 @@ public partial class settings_popup : PanelContainer
public string Channel => GetNode<LineEdit>("%ChannelNameEdit").Text;
[Signal]
public delegate void BeforeOkEventHandler();
[Signal]
public delegate void ImportSelectedEventHandler(string filename);
[Signal]
public delegate void ExportSelectedEventHandler(string filename, ExportSettings settings);
// Called when the node enters the scene tree for the first time.
public override void _Ready()
{
@@ -45,11 +49,13 @@ public partial class settings_popup : PanelContainer
}
public void ShowPopup()
{
Visible = true;
this.GetParentOfType<game>().MenuOpenDisableInteraction();
Show();
}
public void ClosePopup()
{
Hide();
this.GetParentOfType<game>().MenuClosedEnableInteraction();
}
public void _on_cancel_button_pressed()
{
@@ -116,4 +122,16 @@ public partial class settings_popup : PanelContainer
{
GetNode<BaseButton>("%ConnectButton").Disabled = false;
}
private void ImportFileSelected(string filename)
{
EmitSignal(SignalName.ImportSelected, filename);
}
private void ExportFileSelected(string filename)
{
ExportSettings es = new()
{
ScaleImages = GetNode<BaseButton>("%ExportCompressPicturesButton").ButtonPressed,
};
EmitSignal(SignalName.ExportSelected, filename, Variant.From(es));
}
}