mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-15 21:24:16 +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,87 @@
|
|||
using Dalamud.Game.ClientState.Aetherytes;
|
||||
using ImGuiNET;
|
||||
|
||||
namespace Dalamud.Interface.Internal.Windows.Data;
|
||||
|
||||
/// <summary>
|
||||
/// Widget for displaying aetheryte table.
|
||||
/// </summary>
|
||||
internal class AetherytesWidget : IDataWindowWidget
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public DataKind DataKind { get; init; } = DataKind.Aetherytes;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public bool Ready { get; set; }
|
||||
|
||||
/// <inheritdoc/>
|
||||
public void Load()
|
||||
{
|
||||
this.Ready = true;
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public void Draw()
|
||||
{
|
||||
if (!ImGui.BeginTable("##aetheryteTable", 11, ImGuiTableFlags.ScrollY | ImGuiTableFlags.RowBg | ImGuiTableFlags.Borders))
|
||||
return;
|
||||
|
||||
ImGui.TableSetupScrollFreeze(0, 1);
|
||||
ImGui.TableSetupColumn("Idx", ImGuiTableColumnFlags.WidthFixed);
|
||||
ImGui.TableSetupColumn("Name", ImGuiTableColumnFlags.WidthFixed);
|
||||
ImGui.TableSetupColumn("ID", ImGuiTableColumnFlags.WidthFixed);
|
||||
ImGui.TableSetupColumn("Zone", ImGuiTableColumnFlags.WidthFixed);
|
||||
ImGui.TableSetupColumn("Ward", ImGuiTableColumnFlags.WidthFixed);
|
||||
ImGui.TableSetupColumn("Plot", ImGuiTableColumnFlags.WidthFixed);
|
||||
ImGui.TableSetupColumn("Sub", ImGuiTableColumnFlags.WidthFixed);
|
||||
ImGui.TableSetupColumn("Gil", ImGuiTableColumnFlags.WidthFixed);
|
||||
ImGui.TableSetupColumn("Fav", ImGuiTableColumnFlags.WidthFixed);
|
||||
ImGui.TableSetupColumn("Shared", ImGuiTableColumnFlags.WidthFixed);
|
||||
ImGui.TableSetupColumn("Apartment", ImGuiTableColumnFlags.WidthFixed);
|
||||
ImGui.TableHeadersRow();
|
||||
|
||||
var tpList = Service<AetheryteList>.Get();
|
||||
|
||||
for (var i = 0; i < tpList.Length; i++)
|
||||
{
|
||||
var info = tpList[i];
|
||||
if (info == null)
|
||||
continue;
|
||||
|
||||
ImGui.TableNextColumn(); // Idx
|
||||
ImGui.TextUnformatted($"{i}");
|
||||
|
||||
ImGui.TableNextColumn(); // Name
|
||||
ImGui.TextUnformatted($"{info.AetheryteData.GameData?.PlaceName.Value?.Name}");
|
||||
|
||||
ImGui.TableNextColumn(); // ID
|
||||
ImGui.TextUnformatted($"{info.AetheryteId}");
|
||||
|
||||
ImGui.TableNextColumn(); // Zone
|
||||
ImGui.TextUnformatted($"{info.TerritoryId}");
|
||||
|
||||
ImGui.TableNextColumn(); // Ward
|
||||
ImGui.TextUnformatted($"{info.Ward}");
|
||||
|
||||
ImGui.TableNextColumn(); // Plot
|
||||
ImGui.TextUnformatted($"{info.Plot}");
|
||||
|
||||
ImGui.TableNextColumn(); // Sub
|
||||
ImGui.TextUnformatted($"{info.SubIndex}");
|
||||
|
||||
ImGui.TableNextColumn(); // Gil
|
||||
ImGui.TextUnformatted($"{info.GilCost}");
|
||||
|
||||
ImGui.TableNextColumn(); // Favourite
|
||||
ImGui.TextUnformatted($"{info.IsFavourite}");
|
||||
|
||||
ImGui.TableNextColumn(); // Shared
|
||||
ImGui.TextUnformatted($"{info.IsSharedHouse}");
|
||||
|
||||
ImGui.TableNextColumn(); // Apartment
|
||||
ImGui.TextUnformatted($"{info.IsAppartment}");
|
||||
}
|
||||
|
||||
ImGui.EndTable();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue