Add warning in file redirections if extension doesn't match.

This commit is contained in:
Ottermandias 2025-08-28 18:51:57 +02:00
parent c0120f81af
commit a04a5a071c
2 changed files with 23 additions and 1 deletions

@ -1 +1 @@
Subproject commit af41b1787acef9df7dc83619fe81e63a36443ee5
Subproject commit 953dd227afda6b3943b0b88cc965d8aee8a879b5

View file

@ -287,6 +287,17 @@ public partial class ModEditWindow
using var font = ImRaii.PushFont(UiBuilder.IconFont);
ImGuiUtil.TextColored(0xFF0000FF, FontAwesomeIcon.TimesCircle.ToIconString());
}
else if (tmp.Length > 0 && Path.GetExtension(tmp) != registry.File.Extension)
{
ImGui.SameLine();
ImGui.SetCursorPosX(pos);
using (var font = ImRaii.PushFont(UiBuilder.IconFont))
{
ImGuiUtil.TextColored(0xFF00B0B0, FontAwesomeIcon.ExclamationCircle.ToIconString());
}
ImUtf8.HoverTooltip("The game path and the file do not have the same extension."u8);
}
}
private void PrintNewGamePath(int i, FileRegistry registry, IModDataContainer subMod)
@ -319,6 +330,17 @@ public partial class ModEditWindow
using var font = ImRaii.PushFont(UiBuilder.IconFont);
ImGuiUtil.TextColored(0xFF0000FF, FontAwesomeIcon.TimesCircle.ToIconString());
}
else if (tmp.Length > 0 && Path.GetExtension(tmp) != registry.File.Extension)
{
ImGui.SameLine();
ImGui.SetCursorPosX(pos);
using (var font = ImRaii.PushFont(UiBuilder.IconFont))
{
ImGuiUtil.TextColored(0xFF00B0B0, FontAwesomeIcon.ExclamationCircle.ToIconString());
}
ImUtf8.HoverTooltip("The game path and the file do not have the same extension."u8);
}
}
private void DrawButtonHeader()