mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
Fix fly text combo in Dalamud Data (#2262)
This commit is contained in:
parent
b25fceb900
commit
0bddf30577
1 changed files with 9 additions and 6 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue