mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-19 15:14:25 +01:00
Made gamePaths editable directly in the window.
This commit is contained in:
parent
e1d2b8e89f
commit
a4d36d7f61
3 changed files with 14 additions and 7 deletions
|
|
@ -415,11 +415,18 @@ namespace Penumbra.UI
|
||||||
ImGui.Indent(indent);
|
ImGui.Indent(indent);
|
||||||
foreach (var gamePath in gamePaths)
|
foreach (var gamePath in gamePaths)
|
||||||
{
|
{
|
||||||
ImGui.Text(gamePath);
|
string tmp = gamePath;
|
||||||
if (ImGui.IsItemClicked())
|
if (ImGui.InputText($"##{gamePath}", ref tmp, 128, ImGuiInputTextFlags.EnterReturnsTrue))
|
||||||
ImGui.SetClipboardText(gamePath);
|
{
|
||||||
if (ImGui.IsItemHovered())
|
if (tmp != gamePath)
|
||||||
ImGui.SetTooltip( TooltipGamePathText );
|
{
|
||||||
|
gamePaths.Remove(gamePath);
|
||||||
|
if (tmp.Length > 0)
|
||||||
|
gamePaths.Add(tmp);
|
||||||
|
_selector.SaveCurrentMod();
|
||||||
|
_selector.ReloadCurrentMod();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ImGui.Unindent(indent);
|
ImGui.Unindent(indent);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@ namespace Penumbra.UI
|
||||||
private const string TextNoOptionAvailable = "[No Option Available]";
|
private const string TextNoOptionAvailable = "[No Option Available]";
|
||||||
private const string ButtonAddToGroup = "Add to Group";
|
private const string ButtonAddToGroup = "Add to Group";
|
||||||
private const string ButtonRemoveFromGroup = "Remove from Group";
|
private const string ButtonRemoveFromGroup = "Remove from Group";
|
||||||
private const string TooltipGamePathText = "Click to copy to clipboard.";
|
|
||||||
private const string TooltipAboutEdit = "Use Ctrl+Enter for newlines.";
|
private const string TooltipAboutEdit = "Use Ctrl+Enter for newlines.";
|
||||||
|
|
||||||
private const string TextDefaultGamePath = "default";
|
private const string TextDefaultGamePath = "default";
|
||||||
|
|
|
||||||
|
|
@ -265,6 +265,7 @@ namespace Penumbra.UI
|
||||||
}
|
}
|
||||||
_mod.Mod.RefreshModFiles();
|
_mod.Mod.RefreshModFiles();
|
||||||
_base._plugin.ModManager.CalculateEffectiveFileList();
|
_base._plugin.ModManager.CalculateEffectiveFileList();
|
||||||
|
_base._menu._effectiveTab.RebuildFileList(_base._plugin.Configuration.ShowAdvanced);
|
||||||
}
|
}
|
||||||
|
|
||||||
public string SaveCurrentMod()
|
public string SaveCurrentMod()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue