mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-18 22:07:45 +01:00
Add right-click to select only this current filter to changed items.
This commit is contained in:
parent
3b68eca212
commit
03cb88be10
2 changed files with 13 additions and 2 deletions
|
|
@ -169,12 +169,23 @@ public class ChangedItemDrawer : IDisposable
|
|||
var icon = _icons[type];
|
||||
var flag = _config.ChangedItemFilter.HasFlag(type);
|
||||
ImGui.Image(icon.ImGuiHandle, size, Vector2.Zero, Vector2.One, flag ? Vector4.One : new Vector4(0.6f, 0.3f, 0.3f, 1f));
|
||||
if (ImGui.IsItemClicked())
|
||||
if (ImGui.IsItemClicked(ImGuiMouseButton.Left))
|
||||
{
|
||||
_config.ChangedItemFilter = flag ? _config.ChangedItemFilter & ~type : _config.ChangedItemFilter | type;
|
||||
_config.Save();
|
||||
}
|
||||
|
||||
using var popup = ImRaii.ContextPopupItem(type.ToString());
|
||||
if (popup)
|
||||
{
|
||||
if (ImGui.MenuItem("Enable Only This"))
|
||||
{
|
||||
_config.ChangedItemFilter = type;
|
||||
_config.Save();
|
||||
ImGui.CloseCurrentPopup();
|
||||
}
|
||||
}
|
||||
|
||||
if (ImGui.IsItemHovered())
|
||||
{
|
||||
using var tt = ImRaii.Tooltip();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue