Skip to content

Commit da423b7

Browse files
committed
Make lack of Root Directory louder.
1 parent 5c6e070 commit da423b7

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Penumbra/UI/Tabs/SettingsTab.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using Dalamud.Interface;
22
using Dalamud.Interface.Components;
3+
using Dalamud.Interface.Utility;
34
using Dalamud.Plugin;
45
using Dalamud.Plugin.Services;
56
using Dalamud.Utility;
@@ -223,7 +224,15 @@ private void DrawRootFolder()
223224

224225
using var group = ImRaii.Group();
225226
ImGui.SetNextItemWidth(UiHelpers.InputTextMinusButton3);
226-
var save = ImGui.InputText("##rootDirectory", ref _newModDirectory, RootDirectoryMaxLength, ImGuiInputTextFlags.EnterReturnsTrue);
227+
bool save;
228+
using (ImRaii.PushStyle(ImGuiStyleVar.FrameBorderSize, ImGuiHelpers.GlobalScale, !_modManager.Valid))
229+
{
230+
using var color = ImRaii.PushColor(ImGuiCol.Border, Colors.RegexWarningBorder)
231+
.Push(ImGuiCol.TextDisabled, Colors.RegexWarningBorder, !_modManager.Valid);
232+
save = ImGui.InputTextWithHint("##rootDirectory", "Enter Root Directory here (MANDATORY)...", ref _newModDirectory,
233+
RootDirectoryMaxLength, ImGuiInputTextFlags.EnterReturnsTrue);
234+
}
235+
227236
var selected = ImGui.IsItemActive();
228237
using var style = ImRaii.PushStyle(ImGuiStyleVar.ItemSpacing, new Vector2(UiHelpers.ScaleX3, 0));
229238
ImGui.SameLine();

0 commit comments

Comments
 (0)