mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-20 14:57:45 +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;
|
using Dalamud.Game.Gui.FlyText;
|
||||||
|
|
||||||
|
|
@ -39,13 +40,15 @@ internal class FlyTextWidget : IDataWindowWidget
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public void Draw()
|
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));
|
var values = Enum.GetValues<FlyTextKind>().Distinct();
|
||||||
for (var i = 0; i < names.Length; i++)
|
foreach (var value in values)
|
||||||
{
|
{
|
||||||
if (ImGui.Selectable($"{names[i]} ({i})"))
|
if (ImGui.Selectable($"{value} ({(int)value})"))
|
||||||
this.flyKind = (FlyTextKind)i;
|
{
|
||||||
|
this.flyKind = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui.EndCombo();
|
ImGui.EndCombo();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue