mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-30 12:23:39 +01:00
/xldata window refactor (#1257)
Reworks the `/xldata` window so that each individual section is in its own file.
This commit is contained in:
parent
11ea64410e
commit
694159a510
37 changed files with 2701 additions and 1893 deletions
|
|
@ -0,0 +1,52 @@
|
|||
using Dalamud.Game.ClientState.Conditions;
|
||||
using ImGuiNET;
|
||||
|
||||
namespace Dalamud.Interface.Internal.Windows.Data;
|
||||
|
||||
/// <summary>
|
||||
/// Widget for displaying current character condition flags.
|
||||
/// </summary>
|
||||
internal class ConditionWidget : IDataWindowWidget
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public DataKind DataKind { get; init; } = DataKind.Condition;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public bool Ready { get; set; }
|
||||
|
||||
/// <inheritdoc/>
|
||||
public void Load()
|
||||
{
|
||||
this.Ready = true;
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public void Draw()
|
||||
{
|
||||
var condition = Service<Condition>.Get();
|
||||
|
||||
#if DEBUG
|
||||
ImGui.Text($"ptr: 0x{condition.Address.ToInt64():X}");
|
||||
#endif
|
||||
|
||||
ImGui.Text("Current Conditions:");
|
||||
ImGui.Separator();
|
||||
|
||||
var didAny = false;
|
||||
|
||||
for (var i = 0; i < Condition.MaxConditionEntries; i++)
|
||||
{
|
||||
var typedCondition = (ConditionFlag)i;
|
||||
var cond = condition[typedCondition];
|
||||
|
||||
if (!cond) continue;
|
||||
|
||||
didAny = true;
|
||||
|
||||
ImGui.Text($"ID: {i} Enum: {typedCondition}");
|
||||
}
|
||||
|
||||
if (!didAny)
|
||||
ImGui.Text("None. Talk to a shop NPC or visit a market board to find out more!");
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue