diff --git a/RotationSolver.Basic/Data/CombatType.cs b/RotationSolver.Basic/Data/CombatType.cs
index 4e5f93b87..02860ef8c 100644
--- a/RotationSolver.Basic/Data/CombatType.cs
+++ b/RotationSolver.Basic/Data/CombatType.cs
@@ -26,3 +26,14 @@ public enum CombatType : byte
///
Both = PvP | PvE,
}
+
+internal static class ConbatTypeExtension
+{
+ public static uint GetIcon(this CombatType type) => type switch
+ {
+ CombatType.Both => 61540u,
+ CombatType.PvE => 61542u,
+ CombatType.PvP => 61544u,
+ _ => 61523u,
+ };
+}
diff --git a/RotationSolver.Basic/Rotations/Basic/MCH_Base.cs b/RotationSolver.Basic/Rotations/Basic/MCH_Base.cs
index cd9082497..ad93c66b4 100644
--- a/RotationSolver.Basic/Rotations/Basic/MCH_Base.cs
+++ b/RotationSolver.Basic/Rotations/Basic/MCH_Base.cs
@@ -288,7 +288,6 @@ protected static bool OverheatedEndAfterGCD(uint gctCount = 0, float offset = 0)
#endregion
#region PvP
-
///
///
///
diff --git a/RotationSolver/UI/ImGuiHelper.cs b/RotationSolver/UI/ImGuiHelper.cs
index 292d728b9..889265bba 100644
--- a/RotationSolver/UI/ImGuiHelper.cs
+++ b/RotationSolver/UI/ImGuiHelper.cs
@@ -1,4 +1,5 @@
using Dalamud.Game.ClientState.Keys;
+using Dalamud.Interface.Colors;
using Dalamud.Interface.Internal;
using Dalamud.Interface.Utility;
using Dalamud.Interface.Utility.Raii;
@@ -436,4 +437,23 @@ public static bool IsInRect(Vector2 leftTop, Vector2 size)
ConfigUnitType.Percent => LocalizationManager.RightLang.ConfigUnitType_Ratio,
_ => string.Empty,
};
+
+ public static void Draw(this CombatType type)
+ {
+ if (type.HasFlag(CombatType.PvE))
+ {
+ ImGui.SameLine();
+ ImGui.TextColored(ImGuiColors.DalamudYellow, " PvE");
+ }
+ if (type.HasFlag(CombatType.PvP))
+ {
+ ImGui.SameLine();
+ ImGui.TextColored(ImGuiColors.TankBlue, " PvP");
+ }
+ if(type == CombatType.None)
+ {
+ ImGui.SameLine();
+ ImGui.TextColored(ImGuiColors.DalamudRed, " None of PvE or PvP!");
+ }
+ }
}
diff --git a/RotationSolver/UI/RotationConfigWindow.cs b/RotationSolver/UI/RotationConfigWindow.cs
index 4d44c73c4..5dbd1a77e 100644
--- a/RotationSolver/UI/RotationConfigWindow.cs
+++ b/RotationSolver/UI/RotationConfigWindow.cs
@@ -430,28 +430,20 @@ private void DrawRotationIcon(ICustomRotation rotation, float iconSize)
_activeTab = RotationConfigWindowTab.Rotation;
_searchResults = Array.Empty();
}
- var desc = rotation.Name + $" ({rotation.RotationName})";
- var type = rotation.Type;
- if (type.HasFlag(CombatType.PvE))
+ if (ImGui.IsItemHovered())
{
- desc += " PvE";
- }
- if (type.HasFlag(CombatType.PvP))
- {
- desc += " PvP";
+ ImguiTooltips.ShowTooltip(() =>
+ {
+ ImGui.Text(rotation.Name + $" ({rotation.RotationName})");
+ rotation.Type.Draw();
+ if (!string.IsNullOrEmpty(rotation.Description))
+ {
+ ImGui.Text(rotation.Description);
+ }
+ });
}
- if (!string.IsNullOrEmpty(rotation.Description)) desc += "\n \n" + rotation.Description;
- ImguiTooltips.HoveredTooltip(desc);
- var icon = type switch
- {
- CombatType.Both => 61540u,
- CombatType.PvE => 61542u,
- CombatType.PvP => 61544u,
- _ => 61523u,
- };
-
- if (IconSet.GetTexture(icon, out var texture))
+ if (IconSet.GetTexture(rotation.Type.GetIcon(), out var texture))
{
ImGui.SetCursorPos(cursor + Vector2.One * iconSize / 2);
@@ -478,6 +470,18 @@ private static void DrawRotationCombo(float comboSize, ICustomRotation[] rotatio
{
foreach (var r in rotations)
{
+ if (IconSet.GetTexture(r.Type.GetIcon(), out var texture))
+ {
+ ImGui.Image(texture.ImGuiHandle, Vector2.One * 20 * Scale);
+ if (ImGui.IsItemHovered())
+ {
+ ImguiTooltips.ShowTooltip(() =>
+ {
+ rotation.Type.Draw();
+ });
+ }
+ }
+ ImGui.SameLine();
ImGui.PushStyleColor(ImGuiCol.Text, r.GetColor());
if (ImGui.Selectable(r.RotationName))
{