mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-31 21:03:48 +01:00
Change predefined tag handling.
This commit is contained in:
parent
2e2d3e173e
commit
52c1708dd2
6 changed files with 112 additions and 175 deletions
|
|
@ -227,37 +227,38 @@ public class SettingsTab : ITab
|
|||
if (_newModDirectory.IsNullOrEmpty())
|
||||
_newModDirectory = _config.ModDirectory;
|
||||
|
||||
using var group = ImRaii.Group();
|
||||
ImGui.SetNextItemWidth(UiHelpers.InputTextMinusButton3);
|
||||
bool save;
|
||||
using (ImRaii.PushStyle(ImGuiStyleVar.FrameBorderSize, ImGuiHelpers.GlobalScale, !_modManager.Valid))
|
||||
{
|
||||
using var color = ImRaii.PushColor(ImGuiCol.Border, Colors.RegexWarningBorder)
|
||||
.Push(ImGuiCol.TextDisabled, Colors.RegexWarningBorder, !_modManager.Valid);
|
||||
save = ImGui.InputTextWithHint("##rootDirectory", "Enter Root Directory here (MANDATORY)...", ref _newModDirectory,
|
||||
RootDirectoryMaxLength, ImGuiInputTextFlags.EnterReturnsTrue);
|
||||
bool save, selected;
|
||||
using (ImRaii.Group())
|
||||
{
|
||||
ImGui.SetNextItemWidth(UiHelpers.InputTextMinusButton3);
|
||||
using (ImRaii.PushStyle(ImGuiStyleVar.FrameBorderSize, ImGuiHelpers.GlobalScale, !_modManager.Valid))
|
||||
{
|
||||
using var color = ImRaii.PushColor(ImGuiCol.Border, Colors.RegexWarningBorder)
|
||||
.Push(ImGuiCol.TextDisabled, Colors.RegexWarningBorder, !_modManager.Valid);
|
||||
save = ImGui.InputTextWithHint("##rootDirectory", "Enter Root Directory here (MANDATORY)...", ref _newModDirectory,
|
||||
RootDirectoryMaxLength, ImGuiInputTextFlags.EnterReturnsTrue);
|
||||
}
|
||||
|
||||
selected = ImGui.IsItemActive();
|
||||
using var style = ImRaii.PushStyle(ImGuiStyleVar.ItemSpacing, new Vector2(UiHelpers.ScaleX3, 0));
|
||||
ImGui.SameLine();
|
||||
DrawDirectoryPickerButton();
|
||||
style.Pop();
|
||||
ImGui.SameLine();
|
||||
|
||||
const string tt = "This is where Penumbra will store your extracted mod files.\n"
|
||||
+ "TTMP files are not copied, just extracted.\n"
|
||||
+ "This directory needs to be accessible and you need write access here.\n"
|
||||
+ "It is recommended that this directory is placed on a fast hard drive, preferably an SSD.\n"
|
||||
+ "It should also be placed near the root of a logical drive - the shorter the total path to this folder, the better.\n"
|
||||
+ "Definitely do not place it in your Dalamud directory or any sub-directory thereof.";
|
||||
ImGuiComponents.HelpMarker(tt);
|
||||
_tutorial.OpenTutorial(BasicTutorialSteps.GeneralTooltips);
|
||||
ImGui.SameLine();
|
||||
ImGui.TextUnformatted("Root Directory");
|
||||
ImGuiUtil.HoverTooltip(tt);
|
||||
}
|
||||
|
||||
var selected = ImGui.IsItemActive();
|
||||
using var style = ImRaii.PushStyle(ImGuiStyleVar.ItemSpacing, new Vector2(UiHelpers.ScaleX3, 0));
|
||||
ImGui.SameLine();
|
||||
DrawDirectoryPickerButton();
|
||||
style.Pop();
|
||||
ImGui.SameLine();
|
||||
|
||||
const string tt = "This is where Penumbra will store your extracted mod files.\n"
|
||||
+ "TTMP files are not copied, just extracted.\n"
|
||||
+ "This directory needs to be accessible and you need write access here.\n"
|
||||
+ "It is recommended that this directory is placed on a fast hard drive, preferably an SSD.\n"
|
||||
+ "It should also be placed near the root of a logical drive - the shorter the total path to this folder, the better.\n"
|
||||
+ "Definitely do not place it in your Dalamud directory or any sub-directory thereof.";
|
||||
ImGuiComponents.HelpMarker(tt);
|
||||
_tutorial.OpenTutorial(BasicTutorialSteps.GeneralTooltips);
|
||||
ImGui.SameLine();
|
||||
ImGui.TextUnformatted("Root Directory");
|
||||
ImGuiUtil.HoverTooltip(tt);
|
||||
|
||||
group.Dispose();
|
||||
_tutorial.OpenTutorial(BasicTutorialSteps.ModDirectory);
|
||||
ImGui.SameLine();
|
||||
var pos = ImGui.GetCursorPosX();
|
||||
|
|
@ -685,7 +686,7 @@ public class SettingsTab : ITab
|
|||
foreach (var color in Enum.GetValues<ColorId>())
|
||||
{
|
||||
var (defaultColor, name, description) = color.Data();
|
||||
var currentColor = _config.Colors.TryGetValue(color, out var current) ? current : defaultColor;
|
||||
var currentColor = _config.Colors.GetValueOrDefault(color, defaultColor);
|
||||
if (Widget.ColorPicker(name, description, currentColor, c => _config.Colors[color] = c, defaultColor))
|
||||
_config.Save();
|
||||
}
|
||||
|
|
@ -871,7 +872,7 @@ public class SettingsTab : ITab
|
|||
if (!_dalamudConfig.GetDalamudConfig(DalamudConfigService.WaitingForPluginsOption, out bool value))
|
||||
{
|
||||
using var disabled = ImRaii.Disabled();
|
||||
Checkbox("Wait for Plugins on Startup (Disabled, can not access Dalamud Configuration)", string.Empty, false, v => { });
|
||||
Checkbox("Wait for Plugins on Startup (Disabled, can not access Dalamud Configuration)", string.Empty, false, _ => { });
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -923,7 +924,7 @@ public class SettingsTab : ITab
|
|||
return;
|
||||
|
||||
var tagIdx = _sharedTags.Draw("Predefined Tags: ",
|
||||
"Predefined tags that can be added or removed from mods with a single click.", _predefinedTagManager.SharedTags,
|
||||
"Predefined tags that can be added or removed from mods with a single click.", _predefinedTagManager.PredefinedTags,
|
||||
out var editedTag);
|
||||
|
||||
if (tagIdx >= 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue