mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-02 05:43:40 +01:00
Fix and improve DataShare somewhat and add a visualization of current shares to the DataWindow.
This commit is contained in:
parent
0899e6cecc
commit
7b3e2e34ae
2 changed files with 159 additions and 47 deletions
|
|
@ -182,6 +182,7 @@ internal class DataWindow : Window
|
|||
Aetherytes,
|
||||
Dtr_Bar,
|
||||
UIColor,
|
||||
DataShare,
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
|
@ -378,6 +379,9 @@ internal class DataWindow : Window
|
|||
case DataKind.UIColor:
|
||||
this.DrawUIColor();
|
||||
break;
|
||||
case DataKind.DataShare:
|
||||
this.DrawDataShareTab();
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -1765,6 +1769,35 @@ internal class DataWindow : Window
|
|||
}
|
||||
}
|
||||
|
||||
private void DrawDataShareTab()
|
||||
{
|
||||
if (!ImGui.BeginTable("###DataShareTable", 4, ImGuiTableFlags.SizingFixedFit | ImGuiTableFlags.RowBg))
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
ImGui.TableSetupColumn("Shared Tag");
|
||||
ImGui.TableSetupColumn("Creator Assembly");
|
||||
ImGui.TableSetupColumn("#", ImGuiTableColumnFlags.WidthFixed, 30 * ImGuiHelpers.GlobalScale);
|
||||
ImGui.TableSetupColumn("Consumers");
|
||||
ImGui.TableHeadersRow();
|
||||
foreach (var share in Service<DataShare>.Get().GetAllShares())
|
||||
{
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.TextUnformatted(share.Tag);
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.TextUnformatted(share.CreatorAssembly);
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.TextUnformatted(share.Users.Length.ToString());
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.TextUnformatted(string.Join(", ", share.Users));
|
||||
}
|
||||
} finally
|
||||
{
|
||||
ImGui.EndTable();
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawUIColor()
|
||||
{
|
||||
var colorSheet = Service<DataManager>.Get().GetExcelSheet<UIColor>();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue