mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-15 21:24:18 +01:00
.
This commit is contained in:
parent
7710cfadfa
commit
2d6fd6015d
88 changed files with 2304 additions and 383 deletions
55
GlamourerOld/Gui/Interface.DebugDataTab.cs
Normal file
55
GlamourerOld/Gui/Interface.DebugDataTab.cs
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
using System;
|
||||
using Glamourer.Customization;
|
||||
using Glamourer.Services;
|
||||
using Glamourer.Util;
|
||||
using ImGuiNET;
|
||||
using OtterGui;
|
||||
using OtterGui.Raii;
|
||||
|
||||
namespace Glamourer.Gui;
|
||||
|
||||
public partial class Interface
|
||||
{
|
||||
private class DebugDataTab
|
||||
{
|
||||
private readonly CustomizationService _service;
|
||||
|
||||
public DebugDataTab(CustomizationService service)
|
||||
=> _service = service;
|
||||
|
||||
public void Draw()
|
||||
{
|
||||
if (!_service.Valid)
|
||||
return;
|
||||
|
||||
using var tab = ImRaii.TabItem("Debug");
|
||||
if (!tab)
|
||||
return;
|
||||
|
||||
foreach (var clan in _service.AwaitedService.Clans)
|
||||
{
|
||||
foreach (var gender in _service.AwaitedService.Genders)
|
||||
DrawCustomizationInfo(_service.AwaitedService.GetList(clan, gender));
|
||||
}
|
||||
}
|
||||
|
||||
public void DrawCustomizationInfo(CustomizationSet set)
|
||||
{
|
||||
if (!ImGui.CollapsingHeader($"{CustomizeExtensions.ClanName(_service.AwaitedService, set.Clan, set.Gender)} {set.Gender}"))
|
||||
return;
|
||||
|
||||
using var table = ImRaii.Table("data", 5);
|
||||
if (!table)
|
||||
return;
|
||||
|
||||
foreach (var index in Enum.GetValues<CustomizeIndex>())
|
||||
{
|
||||
ImGuiUtil.DrawTableColumn(index.ToString());
|
||||
ImGuiUtil.DrawTableColumn(set.Option(index));
|
||||
ImGuiUtil.DrawTableColumn(set.IsAvailable(index) ? "Available" : "Unavailable");
|
||||
ImGuiUtil.DrawTableColumn(set.Type(index).ToString());
|
||||
ImGuiUtil.DrawTableColumn(set.Count(index).ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue