Made filetype modifiable in AddFilePrompt

This commit is contained in:
MayNL
2026-06-22 11:04:31 -04:00
parent d3dc791a41
commit b37edbf71a
@@ -12,7 +12,17 @@ namespace PckStudio.Popups
/// otherwise <see cref="string.Empty"/> /// otherwise <see cref="string.Empty"/>
/// </summary> /// </summary>
public string Filepath => DialogResult == DialogResult.OK ? InputTextBox.Text : string.Empty; public string Filepath => DialogResult == DialogResult.OK ? InputTextBox.Text : string.Empty;
public PckAssetType Filetype => (PckAssetType)(FileTypeComboBox.SelectedIndex + (FileTypeComboBox.SelectedIndex >= 3 ? 1 : 0)); public PckAssetType Filetype
{
get => (PckAssetType)(FileTypeComboBox.SelectedIndex + (FileTypeComboBox.SelectedIndex >= 3 ? 1 : 0));
set
{
int index = (int)value;
FileTypeComboBox.SelectedIndex = index >= 3 ? index - 1 : index;
}
}
public AddFilePrompt(string initialText) : this(initialText, -1) public AddFilePrompt(string initialText) : this(initialText, -1)
{ } { }