forked from Telltale-Modding-Group/Telltale-Texture-Tool
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
128 changed files
with
2,624 additions
and
14,719 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
135 changes: 135 additions & 0 deletions
135
TelltaleTextureTool/TelltaleTextureTool/GUI/ImageAdvancedOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
using System.ComponentModel; | ||
using CommunityToolkit.Mvvm.ComponentModel; | ||
using TelltaleTextureTool.DirectX; | ||
using TelltaleTextureTool.Main; | ||
using TelltaleTextureTool.TelltaleEnums; | ||
using TelltaleTextureTool.ViewModels; | ||
|
||
namespace TelltaleTextureTool; | ||
|
||
public partial class ImageAdvancedOptions : ObservableObject | ||
{ | ||
|
||
//Private telltale games | ||
[ObservableProperty] | ||
private D3DTXVersion _d3dtxVersion; | ||
|
||
[ObservableProperty] | ||
private TextureType _textureType; | ||
|
||
[ObservableProperty] | ||
private bool _enableMips = false; | ||
|
||
[ObservableProperty] | ||
private bool _autoGenerateMips = false; | ||
|
||
[ObservableProperty] | ||
private bool _manualGenerateMips = false; | ||
|
||
[ObservableProperty] | ||
private uint _setMips = 1; | ||
|
||
[ObservableProperty] | ||
private bool _compression; | ||
|
||
[ObservableProperty] | ||
private bool _enableAutomaticCompression; | ||
|
||
[ObservableProperty] | ||
private bool _isAutomaticCompression; | ||
|
||
[ObservableProperty] | ||
private bool _isManualCompression; | ||
|
||
[ObservableProperty] | ||
private T3SurfaceFormat _format; | ||
|
||
[ObservableProperty] | ||
private bool _enableNormalMap; | ||
|
||
[ObservableProperty] | ||
private bool _encodeDDSHeader; | ||
|
||
[ObservableProperty] | ||
private bool _filterValues; | ||
|
||
[ObservableProperty] | ||
private bool _enableWrapU; | ||
|
||
[ObservableProperty] | ||
private bool _enableWrapV; | ||
|
||
[ObservableProperty] | ||
private bool _enableEditing; | ||
|
||
[ObservableProperty] | ||
private bool _enableSwizzle; | ||
|
||
[ObservableProperty] | ||
private bool _isSwizzle; | ||
|
||
[ObservableProperty] | ||
private bool _isDeswizzle; | ||
|
||
[ObservableProperty] | ||
private T3PlatformType _platformType = T3PlatformType.ePlatform_All; | ||
|
||
[ObservableProperty] | ||
private bool _enableAlpha; | ||
|
||
[ObservableProperty] | ||
private T3TextureAlphaMode _alphaFormat; | ||
|
||
[ObservableProperty] | ||
private ImageEffect _imageEffect; | ||
|
||
// Store a reference to MainViewModel | ||
private readonly MainViewModel _mainViewModel; | ||
|
||
public ImageAdvancedOptions(MainViewModel mainViewModel) | ||
{ | ||
_mainViewModel = mainViewModel; | ||
} | ||
|
||
public ImageAdvancedOptions(ImageAdvancedOptions imageAdvancedOptions) | ||
{ | ||
_d3dtxVersion = imageAdvancedOptions._d3dtxVersion; | ||
_textureType = imageAdvancedOptions._textureType; | ||
_enableMips = imageAdvancedOptions._enableMips; | ||
_autoGenerateMips = imageAdvancedOptions._autoGenerateMips; | ||
_manualGenerateMips = imageAdvancedOptions._manualGenerateMips; | ||
_setMips = imageAdvancedOptions._setMips; | ||
_compression = imageAdvancedOptions._compression; | ||
_enableAutomaticCompression = imageAdvancedOptions._enableAutomaticCompression; | ||
_isAutomaticCompression = imageAdvancedOptions._isAutomaticCompression; | ||
_isManualCompression = imageAdvancedOptions._isManualCompression; | ||
_format = imageAdvancedOptions._format; | ||
_enableNormalMap = imageAdvancedOptions._enableNormalMap; | ||
_encodeDDSHeader = imageAdvancedOptions._encodeDDSHeader; | ||
_filterValues = imageAdvancedOptions._filterValues; | ||
_enableWrapU = imageAdvancedOptions._enableWrapU; | ||
_enableWrapV = imageAdvancedOptions._enableWrapV; | ||
_enableEditing = imageAdvancedOptions._enableEditing; | ||
_enableSwizzle = imageAdvancedOptions._enableSwizzle; | ||
_isSwizzle = imageAdvancedOptions._isSwizzle; | ||
_isDeswizzle = imageAdvancedOptions._isDeswizzle; | ||
_platformType = imageAdvancedOptions._platformType; | ||
_enableAlpha = imageAdvancedOptions._enableAlpha; | ||
_alphaFormat = imageAdvancedOptions._alphaFormat; | ||
_imageEffect = imageAdvancedOptions._imageEffect; | ||
_mainViewModel = imageAdvancedOptions._mainViewModel; | ||
} | ||
|
||
public ImageAdvancedOptions() { } | ||
|
||
// Override OnPropertyChanged to trigger the MainViewModel's command | ||
protected override void OnPropertyChanged(PropertyChangedEventArgs e) | ||
{ | ||
base.OnPropertyChanged(e); | ||
|
||
// Trigger the command in MainViewModel | ||
|
||
_mainViewModel.UpdateBitmapCommand.Execute(null); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.