Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/UI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ private static void CreateCategoryPage(MelonPreferences_Category category)
modMenuOM.scrollable.AddRow(categoryHeader);

int buttonIndex = 0;
int totalIndex = 0;
Il2CppGeneric.List<GameObject> row = new Il2CppGeneric.List<GameObject>();
foreach (var pref in category.Entries)
{
Expand Down Expand Up @@ -198,6 +199,7 @@ private static void CreateCategoryPage(MelonPreferences_Category category)
default:
break;
}
totalIndex++;
if (row.Count == 2)
{
//This is the dumbest code I've ever wrote.
Expand All @@ -207,12 +209,12 @@ private static void CreateCategoryPage(MelonPreferences_Category category)
modMenuOM.scrollable.AddRow(tempRow);
row.Clear();
}
else if (buttonIndex == category.Entries.Count && buttonIndex % 2 == 1) // This might be obsolete
//else if (buttonIndex == category.Entries.Count && buttonIndex % 2 == 1) // This might be obsolete
else if (totalIndex == category.Entries.Count)
{
modMenuOM.scrollable.AddRow(row[0]);
row.Clear();
}

}
}

Expand Down