mirror of
https://codeberg.org/Ikatono/TierMaker.git
synced 2025-10-28 20:45:35 -05:00
functional card/row edit and drag
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user