mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-09-23 11:42:27 +00:00
Made filetype modifiable in AddFilePrompt
This commit is contained in:
@@ -5,14 +5,24 @@ using OMI.Formats.Pck;
|
|||||||
|
|
||||||
namespace PckStudio.Popups
|
namespace PckStudio.Popups
|
||||||
{
|
{
|
||||||
public partial class AddFilePrompt : MetroForm
|
public partial class AddFilePrompt : MetroForm
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Text entered only valid when <see cref="DialogResult"/> == <see cref="DialogResult.OK"/>,
|
/// Text entered only valid when <see cref="DialogResult"/> == <see cref="DialogResult.OK"/>,
|
||||||
/// 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)
|
||||||
{ }
|
{ }
|
||||||
|
|||||||
Reference in New Issue
Block a user