mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +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);
|
||||
foreach (var gamePath in gamePaths)
|
||||
{
|
||||
ImGui.Text(gamePath);
|
||||
if (ImGui.IsItemClicked())
|
||||
ImGui.SetClipboardText(gamePath);
|
||||
if (ImGui.IsItemHovered())
|
||||
ImGui.SetTooltip( TooltipGamePathText );
|
||||
string tmp = gamePath;
|
||||
if (ImGui.InputText($"##{gamePath}", ref tmp, 128, ImGuiInputTextFlags.EnterReturnsTrue))
|
||||
{
|
||||
if (tmp != gamePath)
|
||||
{
|
||||
gamePaths.Remove(gamePath);
|
||||
if (tmp.Length > 0)
|
||||
gamePaths.Add(tmp);
|
||||
_selector.SaveCurrentMod();
|
||||
_selector.ReloadCurrentMod();
|
||||
}
|
||||
}
|
||||
}
|
||||
ImGui.Unindent(indent);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ namespace Penumbra.UI
|
|||
private const string TextNoOptionAvailable = "[No Option Available]";
|
||||
private const string ButtonAddToGroup = "Add to 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 TextDefaultGamePath = "default";
|
||||
|
|
@ -26,7 +25,7 @@ namespace Penumbra.UI
|
|||
private static readonly string TooltipFilesTabEdit = $"{TooltipFilesTab}\nRed Files are replaced in another group or a different option in this group, but not contained in the current option.";
|
||||
private static readonly string TooltipGamePathsEdit = $"Enter all game paths to add or remove, separated by '{GamePathsSeparator}'.\nUse '{TextDefaultGamePath}' to add the original file path.";
|
||||
|
||||
private const float MultiEditBoxWidth = 300f;
|
||||
private const float MultiEditBoxWidth = 300f;
|
||||
|
||||
private void DrawEditGroupSelector()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -265,6 +265,7 @@ namespace Penumbra.UI
|
|||
}
|
||||
_mod.Mod.RefreshModFiles();
|
||||
_base._plugin.ModManager.CalculateEffectiveFileList();
|
||||
_base._menu._effectiveTab.RebuildFileList(_base._plugin.Configuration.ShowAdvanced);
|
||||
}
|
||||
|
||||
public string SaveCurrentMod()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue