using Dalamud.Bindings.ImGui; using Dalamud.Game.Gui; using Dalamud.Plugin.SelfTest; namespace Dalamud.Interface.Internal.Windows.SelfTest.Steps; /// /// Test setup for the Hover events. /// internal class HoverSelfTestStep : ISelfTestStep { private bool clearedItem = false; private bool clearedAction = false; /// public string Name => "Test Hover"; /// public SelfTestStepResult RunStep() { var gameGui = Service.Get(); if (!this.clearedItem) { ImGui.Text("Hover WHM soul crystal..."u8); if (gameGui.HoveredItem == 4547) { this.clearedItem = true; } } if (!this.clearedAction) { ImGui.Text("Hover \"Open Linkshells\" action..."); if (gameGui.HoveredAction != null && gameGui.HoveredAction.ActionKind == HoverActionKind.MainCommand && gameGui.HoveredAction.ActionID == 28) { this.clearedAction = true; } } if (this.clearedItem && this.clearedAction) { return SelfTestStepResult.Pass; } return SelfTestStepResult.Waiting; } /// public void CleanUp() { // ignored } }