Skip to content

Commit

Permalink
Update v3.0.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Lunaretic committed Jul 17, 2024
2 parents 01fd30b + 2f62ae0 commit d2aafc8
Show file tree
Hide file tree
Showing 12 changed files with 179 additions and 81 deletions.
6 changes: 6 additions & 0 deletions FFXIV_TexTools/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,12 @@
<setting name="UseImportedTangents" serializeAs="String">
<value>False</value>
</setting>
<setting name="Default_Image_Format" serializeAs="String">
<value>dds</value>
</setting>
<setting name="Default_Modpack_Format" serializeAs="String">
<value>pmp</value>
</setting>
</FFXIV_TexTools.Properties.Settings>
</userSettings>
<runtime>
Expand Down
6 changes: 3 additions & 3 deletions FFXIV_TexTools/FFXIV_TexTools.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
<Product>FFXIV_TexTools</Product>
<Copyright>Copyright © 2024</Copyright>

<ApplicationVersion>3.0.7.0</ApplicationVersion>
<AssemblyVersion>3.0.7.0</AssemblyVersion>
<FileVersion>3.0.7.0</FileVersion>
<ApplicationVersion>3.0.7.1</ApplicationVersion>
<AssemblyVersion>3.0.7.1</AssemblyVersion>
<FileVersion>3.0.7.1</FileVersion>

<LangVersion>9.0</LangVersion>
<UseWPF>true</UseWPF>
Expand Down
2 changes: 1 addition & 1 deletion FFXIV_TexTools/Helpers/ModpackUpgraderWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public static async Task UpgradeModpackPrompted(bool includePartials = true)

if (ext != ".ttmp2" && ext != ".pmp")
{
ext = ".pmp";
ext = "." + Settings.Default.Default_Modpack_Format;
}


Expand Down
24 changes: 24 additions & 0 deletions FFXIV_TexTools/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions FFXIV_TexTools/Properties/Settings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -143,5 +143,11 @@
<Setting Name="UseImportedTangents" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="Default_Image_Format" Type="System.String" Scope="User">
<Value Profile="(Default)">dds</Value>
</Setting>
<Setting Name="Default_Modpack_Format" Type="System.String" Scope="User">
<Value Profile="(Default)">pmp</Value>
</Setting>
</Settings>
</SettingsFile>
31 changes: 31 additions & 0 deletions FFXIV_TexTools/ViewModels/CustomizeViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,18 @@ public class CustomizeViewModel : INotifyPropertyChanged
new KeyValuePair<string, int>("4096", 4096),
};

public ObservableCollection<KeyValuePair<string, string>> ImageFormats { get; set; } = new ObservableCollection<KeyValuePair<string, string>>()
{
new KeyValuePair<string, string>("DDS", "dds"),
new KeyValuePair<string, string>("TGA", "tga"),
new KeyValuePair<string, string>("PNG", "png"),
};

public ObservableCollection<KeyValuePair<string, string>> ModpackFormats { get; set; } = new ObservableCollection<KeyValuePair<string, string>>()
{
new KeyValuePair<string, string>("PMP", "pmp"),
new KeyValuePair<string, string>("TTMP2", "ttmp2"),
};
public CustomizeViewModel(CustomizeSettingsView view)
{
_view = view;
Expand Down Expand Up @@ -168,6 +179,26 @@ public string DefaultModpackUrl
}
}
}
public string DefaultModpackFormat
{
get => Settings.Default.Default_Modpack_Format;
set
{
Settings.Default.Default_Modpack_Format = value;
Settings.Default.Save();
NotifyPropertyChanged(nameof(DefaultModpackFormat));
}
}
public string DefaultImageFormat
{
get => Settings.Default.Default_Image_Format;
set
{
Settings.Default.Default_Image_Format = value;
Settings.Default.Save();
NotifyPropertyChanged(nameof(DefaultImageFormat));
}
}

/// <summary>
/// The selected skin color
Expand Down
157 changes: 87 additions & 70 deletions FFXIV_TexTools/Views/CustomizeSettingsView.xaml

Large diffs are not rendered by default.

20 changes: 17 additions & 3 deletions FFXIV_TexTools/Views/FileControls/TextureFileControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ protected override async Task<bool> INTERNAL_SaveAs(string externalFilePath)
{
encoder = new BmpEncoder()
{
SupportTransparency = true,
BitsPerPixel = BmpBitsPerPixel.Pixel32
SupportTransparency = false,
BitsPerPixel = BmpBitsPerPixel.Pixel24
};
}
else if (ext == ".png")
Expand Down Expand Up @@ -377,13 +377,27 @@ public override string GetNiceName()
{
return "Texture";
}

protected override KeyValuePair<string, string> GetDefaultExtension()
{
if (Settings.Default.Default_Image_Format == "tga")
{
return new KeyValuePair<string, string>(".tga", "TGA Image");
} else if (Settings.Default.Default_Image_Format == "png")
{
return new KeyValuePair<string, string>(".png", "PNG Image");
} else
{
return new KeyValuePair<string, string>(".dds", "DDS Image");
}
}
public override Dictionary<string, string> GetValidFileExtensions()
{
return new Dictionary<string, string>()
{
{ ".dds", "DDS Image" },
{ ".png", "PNG Image" },
{ ".tga", "TGA Image" },
{ ".png", "PNG Image" },
{ ".bmp", "Bitmap Image" },
{ ".tex", "FFXIV Texture" },
{ ".atex", "FFXIV VFX Texture" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ private async void Export_Click(object sender, RoutedEventArgs e)
Filter = ViewHelpers.ModpackFileFilter,
Title = "Save Modpack...",
InitialDirectory = startingFolder,
FileName = pathSafe + ".pmp"
FileName = pathSafe + "." + Settings.Default.Default_Modpack_Format
};

if (sfd.ShowDialog() != System.Windows.Forms.DialogResult.OK)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ private void CreateModpackButton_Click(object sender, RoutedEventArgs e)
Filter = ViewHelpers.ModpackFileFilter,
Title = "Save Modpack...",
InitialDirectory = startingFolder,
FileName = pathSafe + ".pmp"
FileName = pathSafe + "." + Settings.Default.Default_Modpack_Format
};

if (sfd.ShowDialog() != System.Windows.Forms.DialogResult.OK)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ private async void Finalize_Click(object sender, System.Windows.RoutedEventArgs

var sfd = new SaveFileDialog();
sfd.Filter = ViewHelpers.ModpackFileFilter;
sfd.FileName = Data.MetaPage.Name + ".pmp";
sfd.FileName = Data.MetaPage.Name + "." + Settings.Default.Default_Modpack_Format;
sfd.InitialDirectory = Path.GetFullPath(Settings.Default.ModPack_Directory);

if(sfd.ShowDialog() != System.Windows.Forms.DialogResult.OK)
Expand Down

0 comments on commit d2aafc8

Please sign in to comment.