mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2026-02-24 21:51:48 +01:00
Some updates.
This commit is contained in:
parent
2d8d6fa75f
commit
01f05e5330
38 changed files with 629 additions and 677 deletions
|
|
@ -6,11 +6,13 @@ using Glamourer.Designs.History;
|
|||
using Glamourer.Designs.Special;
|
||||
using Glamourer.Events;
|
||||
using Dalamud.Bindings.ImGui;
|
||||
using ImSharp;
|
||||
using OtterGui;
|
||||
using OtterGui.Classes;
|
||||
using OtterGui.Extensions;
|
||||
using OtterGui.Log;
|
||||
using OtterGui.Widgets;
|
||||
using MouseWheelType = OtterGui.Widgets.MouseWheelType;
|
||||
|
||||
namespace Glamourer.Gui;
|
||||
|
||||
|
|
@ -52,7 +54,7 @@ public abstract class DesignComboBase : FilterComboCache<Tuple<IDesignStandIn, s
|
|||
{
|
||||
case Design realDesign:
|
||||
{
|
||||
using var color = ImRaii.PushColor(ImGuiCol.Text, DesignColors.GetColor(realDesign));
|
||||
using var color = ImGuiColor.Text.Push(DesignColors.GetColor(realDesign));
|
||||
ret = base.DrawSelectable(globalIdx, selected);
|
||||
DrawPath(path, realDesign);
|
||||
return ret;
|
||||
|
|
@ -92,10 +94,9 @@ public abstract class DesignComboBase : FilterComboCache<Tuple<IDesignStandIn, s
|
|||
InnerWidth = 400 * ImGuiHelpers.GlobalScale;
|
||||
var name = label ?? "Select Design Here...";
|
||||
bool ret;
|
||||
using (_ = currentDesign != null ? ImRaii.PushColor(ImGuiCol.Text, DesignColors.GetColor(currentDesign as Design)) : null)
|
||||
using (currentDesign is not null ? ImGuiColor.Text.Push(DesignColors.GetColor(currentDesign as Design)) : null)
|
||||
{
|
||||
ret = Draw("##design", name, string.Empty, width, ImGui.GetTextLineHeightWithSpacing())
|
||||
&& CurrentSelection != null;
|
||||
ret = Draw("##design", name, string.Empty, width, ImGui.GetTextLineHeightWithSpacing()) && CurrentSelection is not null;
|
||||
}
|
||||
|
||||
if (currentDesign is Design design)
|
||||
|
|
@ -192,7 +193,7 @@ public abstract class DesignComboBase : FilterComboCache<Tuple<IDesignStandIn, s
|
|||
if (linkedDesign != null)
|
||||
{
|
||||
ImGui.TextUnformatted("Currently resolving to ");
|
||||
using var color = ImRaii.PushColor(ImGuiCol.Text, DesignColors.GetColor(linkedDesign));
|
||||
using var color = ImGuiColor.Text.Push(DesignColors.GetColor(linkedDesign));
|
||||
ImGui.SameLine(0, 0);
|
||||
ImGui.TextUnformatted(linkedDesign.Name.Text);
|
||||
}
|
||||
|
|
@ -202,7 +203,7 @@ public abstract class DesignComboBase : FilterComboCache<Tuple<IDesignStandIn, s
|
|||
}
|
||||
}
|
||||
|
||||
private static void DrawRightAligned(string leftText, string text, uint color)
|
||||
private static void DrawRightAligned(string leftText, string text, Rgba32 color)
|
||||
{
|
||||
var start = ImGui.GetItemRectMin();
|
||||
var pos = start.X + ImGui.CalcTextSize(leftText).X;
|
||||
|
|
@ -216,8 +217,7 @@ public abstract class DesignComboBase : FilterComboCache<Tuple<IDesignStandIn, s
|
|||
if (offset < ImGui.GetStyle().ItemSpacing.X)
|
||||
ImGuiUtil.HoverTooltip(text);
|
||||
else
|
||||
ImGui.GetWindowDrawList().AddText(start with { X = pos + offset },
|
||||
color, text);
|
||||
Im.Window.DrawList.Text(start with { X = pos + offset }, color, text);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,17 +2,16 @@
|
|||
using Dalamud.Interface;
|
||||
using Dalamud.Interface.Utility;
|
||||
using Dalamud.Interface.Utility.Raii;
|
||||
using Dalamud.Interface.Windowing;
|
||||
using Dalamud.Plugin.Services;
|
||||
using Glamourer.Automation;
|
||||
using Glamourer.Designs;
|
||||
using Glamourer.Interop.Penumbra;
|
||||
using Glamourer.State;
|
||||
using Dalamud.Bindings.ImGui;
|
||||
using OtterGui.Classes;
|
||||
using OtterGui.Text;
|
||||
using Penumbra.GameData.Actors;
|
||||
using Penumbra.GameData.Interop;
|
||||
using Luna;
|
||||
|
||||
namespace Glamourer.Gui;
|
||||
|
||||
|
|
@ -30,7 +29,7 @@ public enum QdbButtons
|
|||
RevertAdvancedCustomization = 0x100,
|
||||
}
|
||||
|
||||
public sealed class DesignQuickBar : Window, IDisposable
|
||||
public sealed class DesignQuickBar : Dalamud.Interface.Windowing.Window, IDisposable
|
||||
{
|
||||
private ImGuiWindowFlags GetFlags
|
||||
=> _config.Ephemeral.LockDesignQuickBar
|
||||
|
|
@ -516,12 +515,12 @@ public sealed class DesignQuickBar : Window, IDisposable
|
|||
_config.Ephemeral.Save();
|
||||
}
|
||||
|
||||
private bool CheckKeyState(ModifiableHotkey key, bool noKey)
|
||||
private bool CheckKeyState(Luna.ModifiableHotkey key, bool noKey)
|
||||
{
|
||||
if (key.Hotkey == VirtualKey.NO_KEY)
|
||||
return noKey;
|
||||
|
||||
return _keyState[key.Hotkey] && key.Modifier1.IsActive() && key.Modifier2.IsActive();
|
||||
return _keyState[key.Hotkey] && key.Modifiers.IsActive();
|
||||
}
|
||||
|
||||
private float UpdateWidth()
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -14,12 +14,10 @@ using Glamourer.Interop.Penumbra;
|
|||
using Dalamud.Bindings.ImGui;
|
||||
using Luna;
|
||||
using OtterGui;
|
||||
using OtterGui.Classes;
|
||||
using OtterGui.Custom;
|
||||
using OtterGui.Raii;
|
||||
using OtterGui.Text;
|
||||
using OtterGui.Widgets;
|
||||
using Changelog = OtterGui.Widgets.Changelog;
|
||||
using Changelog = Luna.Changelog;
|
||||
using ITab = OtterGui.Widgets.ITab;
|
||||
using Window = Dalamud.Interface.Windowing.Window;
|
||||
|
||||
|
|
@ -53,7 +51,7 @@ public class MainWindow : Window, IDisposable
|
|||
private readonly TabSelected _event;
|
||||
private readonly MainWindowPosition _position;
|
||||
private readonly ITab[] _tabs;
|
||||
private bool _ignorePenumbra = false;
|
||||
private bool _ignorePenumbra;
|
||||
|
||||
public readonly SettingsTab Settings;
|
||||
public readonly ActorTab Actors;
|
||||
|
|
@ -208,13 +206,13 @@ public class MainWindow : Window, IDisposable
|
|||
var width = ImUtf8.CalcTextSize(SupportInfoButtonText).X + ImGui.GetStyle().FramePadding.X * 2;
|
||||
var xPos = ImGui.GetWindowWidth() - width;
|
||||
ImGui.SetCursorPos(new Vector2(xPos, 0));
|
||||
CustomGui.DrawDiscordButton(Glamourer.Messager, width);
|
||||
SupportButton.Discord(Glamourer.Messager, width);
|
||||
|
||||
ImGui.SetCursorPos(new Vector2(xPos, ImGui.GetFrameHeightWithSpacing()));
|
||||
DrawSupportButton(glamourer);
|
||||
|
||||
ImGui.SetCursorPos(new Vector2(xPos, 2 * ImGui.GetFrameHeightWithSpacing()));
|
||||
CustomGui.DrawGuideButton(Glamourer.Messager, width);
|
||||
SupportButton.ReniGuide(Glamourer.Messager, width);
|
||||
|
||||
ImGui.SetCursorPos(new Vector2(xPos, 3 * ImGui.GetFrameHeightWithSpacing()));
|
||||
if (ImGui.Button("Show Changelogs", new Vector2(width, 0)))
|
||||
|
|
@ -270,7 +268,7 @@ public class MainWindow : Window, IDisposable
|
|||
|
||||
ImGui.NewLine();
|
||||
ImGui.NewLine();
|
||||
CustomGui.DrawDiscordButton(Glamourer.Messager, 0);
|
||||
SupportButton.Discord(Glamourer.Messager, 0);
|
||||
ImGui.SameLine();
|
||||
ImGui.NewLine();
|
||||
ImGui.NewLine();
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ using Penumbra.GameData.Enums;
|
|||
using Penumbra.GameData.Files.MaterialStructs;
|
||||
using Penumbra.GameData.Interop;
|
||||
using Penumbra.String;
|
||||
using Notification = OtterGui.Classes.Notification;
|
||||
using Notification = Luna.Notification;
|
||||
|
||||
namespace Glamourer.Gui.Materials;
|
||||
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ using Glamourer.Gui.Materials;
|
|||
using Glamourer.Interop;
|
||||
using Glamourer.State;
|
||||
using Dalamud.Bindings.ImGui;
|
||||
using Luna;
|
||||
using OtterGui;
|
||||
using OtterGui.Classes;
|
||||
using OtterGui.Raii;
|
||||
using OtterGui.Text;
|
||||
using OtterGui.Text.HelperObjects;
|
||||
|
|
|
|||
|
|
@ -1,23 +1,23 @@
|
|||
using Glamourer.Designs;
|
||||
using Dalamud.Bindings.ImGui;
|
||||
using ImSharp;
|
||||
using OtterGui;
|
||||
using OtterGui.Raii;
|
||||
using OtterGui.Widgets;
|
||||
using MouseWheelType = OtterGui.Widgets.MouseWheelType;
|
||||
|
||||
namespace Glamourer.Gui.Tabs.DesignTab;
|
||||
|
||||
public sealed class DesignColorCombo(DesignColors _designColors, bool _skipAutomatic) :
|
||||
FilterComboCache<string>(_skipAutomatic
|
||||
? _designColors.Keys.OrderBy(k => k)
|
||||
: _designColors.Keys.OrderBy(k => k).Prepend(DesignColors.AutomaticName),
|
||||
public sealed class DesignColorCombo(DesignColors designColors, bool skipAutomatic) :
|
||||
FilterComboCache<string>(skipAutomatic
|
||||
? designColors.Keys.OrderBy(k => k)
|
||||
: designColors.Keys.OrderBy(k => k).Prepend(DesignColors.AutomaticName),
|
||||
MouseWheelType.Control, Glamourer.Log)
|
||||
{
|
||||
protected override bool DrawSelectable(int globalIdx, bool selected)
|
||||
{
|
||||
var isAutomatic = !_skipAutomatic && globalIdx == 0;
|
||||
var isAutomatic = !skipAutomatic && globalIdx is 0;
|
||||
var key = Items[globalIdx];
|
||||
var color = isAutomatic ? 0 : _designColors[key];
|
||||
using var c = ImRaii.PushColor(ImGuiCol.Text, color, color != 0);
|
||||
var color = isAutomatic ? 0 : designColors[key];
|
||||
using var c = ImGuiColor.Text.Push(color, !color.IsTransparent);
|
||||
var ret = base.DrawSelectable(globalIdx, selected);
|
||||
if (isAutomatic)
|
||||
ImGuiUtil.HoverTooltip(
|
||||
|
|
|
|||
|
|
@ -3,11 +3,13 @@ using Dalamud.Interface.ImGuiNotification;
|
|||
using Glamourer.Designs;
|
||||
using Glamourer.Services;
|
||||
using Dalamud.Bindings.ImGui;
|
||||
using ImSharp;
|
||||
using Luna;
|
||||
using OtterGui;
|
||||
using OtterGui.Classes;
|
||||
using OtterGui.Raii;
|
||||
using OtterGui.Text;
|
||||
using OtterGui.Widgets;
|
||||
using TagButtons = OtterGui.Widgets.TagButtons;
|
||||
|
||||
namespace Glamourer.Gui.Tabs.DesignTab;
|
||||
|
||||
|
|
@ -189,7 +191,8 @@ public class DesignDetailTab
|
|||
else if (_selector.Selected!.Color.Length != 0)
|
||||
{
|
||||
ImGui.SameLine();
|
||||
ImUtf8.Icon(FontAwesomeIcon.ExclamationCircle, "The color associated with this design does not exist."u8, _colors.MissingColor);
|
||||
ImEx.Icon.Draw(LunaStyle.WarningIcon, _colors.MissingColor);
|
||||
Im.Tooltip.OnHover("The color associated with this design does not exist."u8);
|
||||
}
|
||||
|
||||
ImUtf8.DrawFrameColumn("Creation Date"u8);
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ using Glamourer.Designs.History;
|
|||
using Glamourer.Events;
|
||||
using Glamourer.Services;
|
||||
using Dalamud.Bindings.ImGui;
|
||||
using ImSharp;
|
||||
using OtterGui;
|
||||
using OtterGui.Classes;
|
||||
using OtterGui.Filesystem;
|
||||
|
|
@ -13,6 +14,7 @@ using OtterGui.FileSystem.Selector;
|
|||
using OtterGui.Log;
|
||||
using OtterGui.Raii;
|
||||
using OtterGui.Text;
|
||||
using Luna;
|
||||
|
||||
namespace Glamourer.Gui.Tabs.DesignTab;
|
||||
|
||||
|
|
@ -43,7 +45,7 @@ public sealed class DesignFileSystemSelector : FileSystemSelector<Design, Design
|
|||
public new DesignFileSystem.Leaf? SelectedLeaf
|
||||
=> base.SelectedLeaf;
|
||||
|
||||
public record struct DesignState(uint Color)
|
||||
public record struct DesignState(Rgba32 Color)
|
||||
{ }
|
||||
|
||||
protected override float CurrentWidth
|
||||
|
|
@ -70,7 +72,7 @@ public sealed class DesignFileSystemSelector : FileSystemSelector<Design, Design
|
|||
}
|
||||
|
||||
public DesignFileSystemSelector(DesignManager designManager, DesignFileSystem fileSystem, IKeyState keyState, DesignChanged @event,
|
||||
Configuration config, DesignConverter converter, TabSelected selectionEvent, Logger log, DesignColors designColors,
|
||||
Configuration config, DesignConverter converter, TabSelected selectionEvent, OtterGui.Log.Logger log, DesignColors designColors,
|
||||
DesignApplier designApplier)
|
||||
: base(fileSystem, keyState, log, allowMultipleSelection: true)
|
||||
{
|
||||
|
|
@ -174,7 +176,7 @@ public sealed class DesignFileSystemSelector : FileSystemSelector<Design, Design
|
|||
{
|
||||
var flag = selected ? ImGuiTreeNodeFlags.Selected | LeafFlags : LeafFlags;
|
||||
var name = IncognitoMode ? leaf.Value.Incognito : leaf.Value.Name.Text;
|
||||
using var color = ImRaii.PushColor(ImGuiCol.Text, state.Color);
|
||||
using var color = ImGuiColor.Text.Push(state.Color);
|
||||
using var _ = ImUtf8.TreeNode(name, flag);
|
||||
if (_config.AllowDoubleClickToApply && ImGui.IsItemHovered() && ImGui.IsMouseDoubleClicked(ImGuiMouseButton.Left))
|
||||
_designApplier.ApplyToPlayer(leaf.Value);
|
||||
|
|
@ -271,7 +273,9 @@ public sealed class DesignFileSystemSelector : FileSystemSelector<Design, Design
|
|||
}
|
||||
|
||||
private void DeleteButton(Vector2 size)
|
||||
=> DeleteSelectionButton(size, _config.DeleteDesignModifier, "design", "designs", _designManager.Delete);
|
||||
=> DeleteSelectionButton(size,
|
||||
new OtterGui.Classes.DoubleModifier(new OtterGui.Classes.ModifierHotkey(_config.DeleteDesignModifier.Modifier1),
|
||||
new OtterGui.Classes.ModifierHotkey(_config.DeleteDesignModifier.Modifier2)), "design", "designs", _designManager.Delete);
|
||||
|
||||
private void DrawNewDesignPopup()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ using Glamourer.Automation;
|
|||
using Glamourer.Designs;
|
||||
using Glamourer.Designs.Links;
|
||||
using Dalamud.Bindings.ImGui;
|
||||
using ImSharp;
|
||||
using Luna;
|
||||
using OtterGui;
|
||||
using OtterGui.Raii;
|
||||
|
|
@ -97,13 +98,13 @@ public class DesignLinkDrawer(
|
|||
var color = colorManager.GetColor(selector.Selected!);
|
||||
using (ImRaii.PushFont(UiBuilder.IconFont))
|
||||
{
|
||||
using var c = ImRaii.PushColor(ImGuiCol.Text, color);
|
||||
using var c = ImGuiColor.Text.Push(color);
|
||||
ImGui.AlignTextToFramePadding();
|
||||
ImGuiUtil.RightAlign(FontAwesomeIcon.ArrowRightLong.ToIconString());
|
||||
}
|
||||
|
||||
ImGui.TableNextColumn();
|
||||
using (ImRaii.PushColor(ImGuiCol.Text, color))
|
||||
using (ImGuiColor.Text.Push(color))
|
||||
{
|
||||
ImGui.AlignTextToFramePadding();
|
||||
ImGui.Selectable(selector.IncognitoMode ? selector.Selected!.Incognito : selector.Selected!.Name.Text);
|
||||
|
|
@ -114,7 +115,7 @@ public class DesignLinkDrawer(
|
|||
ImGui.TableNextColumn();
|
||||
using (ImRaii.PushFont(UiBuilder.IconFont))
|
||||
{
|
||||
using var c = ImRaii.PushColor(ImGuiCol.Text, color);
|
||||
using var c = ImGuiColor.Text.Push(color);
|
||||
ImGui.AlignTextToFramePadding();
|
||||
ImGui.TextUnformatted(FontAwesomeIcon.ArrowLeftLong.ToIconString());
|
||||
}
|
||||
|
|
@ -134,7 +135,7 @@ public class DesignLinkDrawer(
|
|||
var (design, flags) = list[i];
|
||||
ImGui.TableNextColumn();
|
||||
|
||||
using (ImRaii.PushColor(ImGuiCol.Text, colorManager.GetColor(design)))
|
||||
using (ImGuiColor.Text.Push(colorManager.GetColor(design)))
|
||||
{
|
||||
ImGui.AlignTextToFramePadding();
|
||||
ImGui.Selectable(selector.IncognitoMode ? design.Incognito : design.Name.Text);
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ using Glamourer.Gui.Materials;
|
|||
using Glamourer.Interop;
|
||||
using Glamourer.State;
|
||||
using Dalamud.Bindings.ImGui;
|
||||
using Luna;
|
||||
using OtterGui;
|
||||
using OtterGui.Classes;
|
||||
using OtterGui.Raii;
|
||||
using OtterGui.Text;
|
||||
using Penumbra.GameData.Enums;
|
||||
|
|
|
|||
|
|
@ -1,30 +1,28 @@
|
|||
using Dalamud.Interface.ImGuiNotification;
|
||||
using Dalamud.Interface.Utility;
|
||||
using Glamourer.Designs;
|
||||
using Glamourer.Interop;
|
||||
using Dalamud.Bindings.ImGui;
|
||||
using OtterGui.Classes;
|
||||
using OtterGui.Widgets;
|
||||
using Luna;
|
||||
|
||||
namespace Glamourer.Gui.Tabs.DesignTab;
|
||||
|
||||
public class DesignTab(DesignFileSystemSelector _selector, DesignPanel _panel, ImportService _importService, DesignManager _manager)
|
||||
: ITab
|
||||
public class DesignTab(DesignFileSystemSelector selector, DesignPanel panel, ImportService importService, DesignManager manager)
|
||||
: OtterGui.Widgets.ITab
|
||||
{
|
||||
public ReadOnlySpan<byte> Label
|
||||
=> "Designs"u8;
|
||||
|
||||
public void DrawContent()
|
||||
{
|
||||
_selector.Draw();
|
||||
if (_importService.CreateCharaTarget(out var designBase, out var name))
|
||||
selector.Draw();
|
||||
if (importService.CreateCharaTarget(out var designBase, out var name))
|
||||
{
|
||||
var newDesign = _manager.CreateClone(designBase, name, true);
|
||||
var newDesign = manager.CreateClone(designBase, name, true);
|
||||
Glamourer.Messager.NotificationMessage($"Imported Anamnesis .chara file {name} as new design {newDesign.Name}", NotificationType.Success, false);
|
||||
}
|
||||
|
||||
ImGui.SameLine();
|
||||
_panel.Draw();
|
||||
_importService.CreateCharaSource();
|
||||
panel.Draw();
|
||||
importService.CreateCharaSource();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ using Glamourer.Designs;
|
|||
using Glamourer.Interop.Penumbra;
|
||||
using Glamourer.State;
|
||||
using Dalamud.Bindings.ImGui;
|
||||
using Luna;
|
||||
using OtterGui;
|
||||
using OtterGui.Classes;
|
||||
using OtterGui.Extensions;
|
||||
|
|
|
|||
|
|
@ -1,21 +1,16 @@
|
|||
using OtterGui.Classes;
|
||||
using OtterGui.Widgets;
|
||||
using Luna;
|
||||
using ITab = OtterGui.Widgets.ITab;
|
||||
|
||||
namespace Glamourer.Gui.Tabs;
|
||||
|
||||
public class MessagesTab : ITab
|
||||
public class MessagesTab(MessageService messages) : ITab
|
||||
{
|
||||
private readonly MessageService _messages;
|
||||
|
||||
public MessagesTab(MessageService messages)
|
||||
=> _messages = messages;
|
||||
|
||||
public ReadOnlySpan<byte> Label
|
||||
=> "Messages"u8;
|
||||
|
||||
public bool IsVisible
|
||||
=> _messages.Count > 0;
|
||||
=> messages.Count > 0;
|
||||
|
||||
public void DrawContent()
|
||||
=> _messages.Draw();
|
||||
=> messages.DrawNotificationLog();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
using Glamourer.Designs;
|
||||
using Glamourer.GameData;
|
||||
using Glamourer.Services;
|
||||
using Dalamud.Bindings.ImGui;
|
||||
using ImSharp;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
|
|
@ -26,7 +26,7 @@ public class LocalNpcAppearanceData : ISavable
|
|||
public bool IsFavorite(in NpcData data)
|
||||
=> _data.TryGetValue(ToKey(data), out var tuple) && tuple.Favorite;
|
||||
|
||||
public (uint Color, bool Favorite) GetData(in NpcData data)
|
||||
public (Rgba32 Color, bool Favorite) GetData(in NpcData data)
|
||||
=> _data.TryGetValue(ToKey(data), out var t)
|
||||
? (GetColor(t.Color, t.Favorite, data.Kind), t.Favorite)
|
||||
: (GetColor(string.Empty, false, data.Kind), false);
|
||||
|
|
@ -34,7 +34,7 @@ public class LocalNpcAppearanceData : ISavable
|
|||
public string GetColor(in NpcData data)
|
||||
=> _data.TryGetValue(ToKey(data), out var t) ? t.Color : string.Empty;
|
||||
|
||||
private uint GetColor(string color, bool favorite, ObjectKind kind)
|
||||
private Rgba32 GetColor(string color, bool favorite, ObjectKind kind)
|
||||
{
|
||||
if (color.Length == 0)
|
||||
{
|
||||
|
|
@ -47,7 +47,7 @@ public class LocalNpcAppearanceData : ISavable
|
|||
}
|
||||
|
||||
if (_colors.TryGetValue(color, out var value))
|
||||
return value == 0 ? ImGui.GetColorU32(ImGuiCol.Text) : value;
|
||||
return value.IsTransparent ? Im.Color.Get(ImGuiColor.Text) : value;
|
||||
|
||||
return _colors.MissingColor;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ using Glamourer.Gui.Equipment;
|
|||
using Glamourer.Gui.Tabs.DesignTab;
|
||||
using Glamourer.State;
|
||||
using Dalamud.Bindings.ImGui;
|
||||
using ImSharp;
|
||||
using Luna;
|
||||
using OtterGui;
|
||||
using OtterGui.Classes;
|
||||
using OtterGui.Raii;
|
||||
|
|
@ -279,12 +281,12 @@ public class NpcPanel
|
|||
if (DesignColorUi.DrawColorButton($"Color associated with {color}", currentColor, out var newColor))
|
||||
_colors.SetColor(color, newColor);
|
||||
}
|
||||
else if (color.Length != 0)
|
||||
else if (color.Length is not 0)
|
||||
{
|
||||
ImGui.SameLine();
|
||||
var size = new Vector2(ImGui.GetFrameHeight());
|
||||
using var font = ImRaii.PushFont(UiBuilder.IconFont);
|
||||
ImGuiUtil.DrawTextButton(FontAwesomeIcon.ExclamationCircle.ToIconString(), size, 0, _colors.MissingColor);
|
||||
ImEx.TextFramed(LunaStyle.WarningIcon.Span, size, _colors.MissingColor);
|
||||
ImUtf8.HoverTooltip("The color associated with this design does not exist."u8);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
using Glamourer.GameData;
|
||||
using Dalamud.Bindings.ImGui;
|
||||
using OtterGui;
|
||||
using ImSharp;
|
||||
using OtterGui.Extensions;
|
||||
using OtterGui.Raii;
|
||||
using ImGuiClip = OtterGui.ImGuiClip;
|
||||
|
|
@ -85,7 +85,7 @@ public class NpcSelector : IDisposable
|
|||
private void DrawSelectable(int globalIndex)
|
||||
{
|
||||
using var id = ImRaii.PushId(globalIndex);
|
||||
using var color = ImRaii.PushColor(ImGuiCol.Text, _favorites.GetData(_npcs[globalIndex]).Color);
|
||||
using var color = ImGuiColor.Text.Push(_favorites.GetData(_npcs[globalIndex]).Color);
|
||||
if (ImGui.Selectable(_npcs[globalIndex].Name, _selectedGlobalIndex == globalIndex, ImGuiSelectableFlags.AllowItemOverlap))
|
||||
_selectedGlobalIndex = globalIndex;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,10 +12,13 @@ using Glamourer.Interop;
|
|||
using Glamourer.Interop.PalettePlus;
|
||||
using Glamourer.Interop.Penumbra;
|
||||
using Glamourer.Services;
|
||||
using ImSharp;
|
||||
using Luna;
|
||||
using OtterGui;
|
||||
using OtterGui.Raii;
|
||||
using OtterGui.Text;
|
||||
using OtterGui.Widgets;
|
||||
using ITab = OtterGui.Widgets.ITab;
|
||||
|
||||
namespace Glamourer.Gui.Tabs.SettingsTab;
|
||||
|
||||
|
|
@ -194,9 +197,8 @@ public class SettingsTab(
|
|||
EphemeralCheckbox("Lock Quick Design Bar"u8, "Prevent the quick design bar from being moved and lock it in place."u8,
|
||||
config.Ephemeral.LockDesignQuickBar,
|
||||
v => config.Ephemeral.LockDesignQuickBar = v);
|
||||
if (Widget.ModifiableKeySelector("Hotkey to Toggle Quick Design Bar", "Set a hotkey that opens or closes the quick design bar.",
|
||||
100 * ImGuiHelpers.GlobalScale,
|
||||
config.ToggleQuickDesignBar, v => config.ToggleQuickDesignBar = v, _validKeys))
|
||||
if (KeySelector.ModifiableKeySelector("Hotkey to Toggle Quick Design Bar"u8, "Set a hotkey that opens or closes the quick design bar."u8,
|
||||
100 * ImGuiHelpers.GlobalScale, config.ToggleQuickDesignBar, v => config.ToggleQuickDesignBar = v, _validKeys))
|
||||
config.Save();
|
||||
|
||||
Checkbox("Show Quick Design Bar in Main Window"u8,
|
||||
|
|
@ -246,12 +248,12 @@ public class SettingsTab(
|
|||
Checkbox("Show Application Checkboxes"u8,
|
||||
"Show the application checkboxes in the Customization and Equipment panels of the design tab, instead of only showing them under Application Rules."u8,
|
||||
!config.HideApplyCheckmarks, v => config.HideApplyCheckmarks = !v);
|
||||
if (Widget.DoubleModifierSelector("Design Deletion Modifier",
|
||||
"A modifier you need to hold while clicking the Delete Design button for it to take effect.", 100 * ImGuiHelpers.GlobalScale,
|
||||
if (KeySelector.DoubleModifier("Design Deletion Modifier"u8,
|
||||
"A modifier you need to hold while clicking the Delete Design button for it to take effect."u8, 100 * ImGuiHelpers.GlobalScale,
|
||||
config.DeleteDesignModifier, v => config.DeleteDesignModifier = v))
|
||||
config.Save();
|
||||
if (Widget.DoubleModifierSelector("Incognito Modifier",
|
||||
"A modifier you need to hold while clicking the Incognito button for it to take effect.", 100 * ImGuiHelpers.GlobalScale,
|
||||
if (KeySelector.DoubleModifier("Incognito Modifier"u8,
|
||||
"A modifier you need to hold while clicking the Incognito button for it to take effect."u8, 100 * ImGuiHelpers.GlobalScale,
|
||||
config.IncognitoModifier, v => config.IncognitoModifier = v))
|
||||
config.Save();
|
||||
DrawRenameSettings();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue