Fix fly text combo in Dalamud Data (#2262)

This commit is contained in:
Aireil 2025-04-26 01:28:12 +02:00 committed by GitHub
parent b25fceb900
commit 0bddf30577
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,4 +1,5 @@
using System.Numerics;
using System.Linq;
using System.Numerics;
using Dalamud.Game.Gui.FlyText;
@ -39,13 +40,15 @@ internal class FlyTextWidget : IDataWindowWidget
/// <inheritdoc/>
public void Draw()
{
if (ImGui.BeginCombo("Kind", this.flyKind.ToString()))
if (ImGui.BeginCombo("Kind", $"{this.flyKind} ({(int)this.flyKind})"))
{
var names = Enum.GetNames(typeof(FlyTextKind));
for (var i = 0; i < names.Length; i++)
var values = Enum.GetValues<FlyTextKind>().Distinct();
foreach (var value in values)
{
if (ImGui.Selectable($"{names[i]} ({i})"))
this.flyKind = (FlyTextKind)i;
if (ImGui.Selectable($"{value} ({(int)value})"))
{
this.flyKind = value;
}
}
ImGui.EndCombo();