mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 22:17:22 +01:00
do not allow to change storage folder as long as monitoring is active
This commit is contained in:
parent
6f397d9b12
commit
432a337363
2 changed files with 28 additions and 25 deletions
|
|
@ -535,7 +535,6 @@ public class SettingsUi : WindowMediatorSubscriberBase
|
||||||
+ UiSharedService.TooltipSeparator + "Hold CTRL to enable this button");
|
+ UiSharedService.TooltipSeparator + "Hold CTRL to enable this button");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
_uiShared.DrawCacheDirectorySetting();
|
_uiShared.DrawCacheDirectorySetting();
|
||||||
ImGui.TextUnformatted($"Currently utilized local storage: {UiSharedService.ByteToString(_uiShared.FileCacheSize)}");
|
ImGui.TextUnformatted($"Currently utilized local storage: {UiSharedService.ByteToString(_uiShared.FileCacheSize)}");
|
||||||
bool isLinux = Util.IsWine();
|
bool isLinux = Util.IsWine();
|
||||||
|
|
|
||||||
|
|
@ -561,9 +561,9 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
|
||||||
ImGui.InputText("Storage Folder##cache", ref cacheDirectory, 255, ImGuiInputTextFlags.ReadOnly);
|
ImGui.InputText("Storage Folder##cache", ref cacheDirectory, 255, ImGuiInputTextFlags.ReadOnly);
|
||||||
|
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
ImGui.PushFont(UiBuilder.IconFont);
|
using (ImRaii.Disabled(_cacheMonitor.MareWatcher != null))
|
||||||
string folderIcon = FontAwesomeIcon.Folder.ToIconString();
|
{
|
||||||
if (ImGui.Button(folderIcon + "##chooseCacheFolder"))
|
if (NormalizedIconButton(FontAwesomeIcon.Folder))
|
||||||
{
|
{
|
||||||
FileDialogManager.OpenFolderDialog("Pick Mare Synchronos Storage Folder", (success, path) =>
|
FileDialogManager.OpenFolderDialog("Pick Mare Synchronos Storage Folder", (success, path) =>
|
||||||
{
|
{
|
||||||
|
|
@ -588,7 +588,11 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
ImGui.PopFont();
|
}
|
||||||
|
if (_cacheMonitor.MareWatcher != null)
|
||||||
|
{
|
||||||
|
AttachToolTip("Stop the Monitoring before changing the Storage folder. As long as monitoring is active, you cannot change the Storage folder location.");
|
||||||
|
}
|
||||||
|
|
||||||
if (_isPenumbraDirectory)
|
if (_isPenumbraDirectory)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue