Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
fix: add an assembly info tab in Rotation Dev.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Apr 11, 2023
1 parent 5989a8a commit 242ca55
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions RotationSolver/UI/RotationConfigWindow_RotationDev.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,30 @@ private void DrawRotationDevTab()
DrawCheckBox(LocalizationManager.RightLang.ConfigWindow_Param_InDebug,
ref Service.Config.InDebug, Service.Default.InDebug);

ImGui.PushStyleVar(ImGuiStyleVar.ItemSpacing, new Vector2(0f, 5f));

if (ImGui.BeginTabBar("Rotation Devs"))
{
if (ImGui.BeginTabItem("Libs"))
{
DrawThridLibs();
ImGui.EndTabItem();
}

if (ImGui.BeginTabItem("Infos"))
{
DrawAssemblyInfos();
ImGui.EndTabItem();
}

ImGui.EndTabBar();
}
ImGui.PopStyleVar();
}

private void DrawThridLibs()
{

if (ImGui.BeginChild("Third-party Libs", new Vector2(0f, -1f), true))
{
if (ImGui.Button("AddOne"))
Expand Down Expand Up @@ -58,4 +82,17 @@ private void DrawRotationDevTab()
ImGui.EndChild();
}
}
private void DrawAssemblyInfos()
{
var assemblies = RotationUpdater.CustomRotationsDict
.SelectMany(d => d.Value)
.SelectMany(g => g.rotations)
.Select(r => r.GetType().Assembly)
.ToHashSet();

foreach (var assembly in assemblies)
{
ImGui.Text(assembly.GetName().Name + " - " + assembly.GetAuthor());
}
}
}

0 comments on commit 242ca55

Please sign in to comment.