Add right-click to select only this current filter to changed items.

This commit is contained in:
Ottermandias 2023-06-12 16:17:29 +02:00
parent 3b68eca212
commit 03cb88be10
2 changed files with 13 additions and 2 deletions

@ -1 +1 @@
Subproject commit 57f84013b42be29e4a17e5dcf6b2f59c15c2586d
Subproject commit 029676a3e25112e5db6457c4d5cfe9e4d38511a6

View file

@ -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();