mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-20 15:44:22 +01:00
Add model update button.
This commit is contained in:
parent
4f0f3721a6
commit
0d939b12f4
3 changed files with 24 additions and 7 deletions
|
|
@ -207,12 +207,15 @@ public class FileEditor<T>(
|
|||
var canSave = _changed && _currentFile is { Valid: true };
|
||||
if (ImGuiUtil.DrawDisabledButton("Save to File", Vector2.Zero,
|
||||
$"Save the selected {fileType} file with all changes applied. This is not revertible.", !canSave))
|
||||
{
|
||||
compactor.WriteAllBytes(_currentPath!.File.FullName, _currentFile!.Write());
|
||||
if (owner.Mod != null)
|
||||
communicator.ModFileChanged.Invoke(owner.Mod, _currentPath);
|
||||
_changed = false;
|
||||
}
|
||||
SaveFile();
|
||||
}
|
||||
|
||||
public void SaveFile()
|
||||
{
|
||||
compactor.WriteAllBytes(_currentPath!.File.FullName, _currentFile!.Write());
|
||||
if (owner.Mod != null)
|
||||
communicator.ModFileChanged.Invoke(owner.Mod, _currentPath);
|
||||
_changed = false;
|
||||
}
|
||||
|
||||
private void ResetButton()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue