Skip to content

Commit 4f1a13e

Browse files
Category settingz
1 parent 73a2e3f commit 4f1a13e

File tree

5 files changed

+63
-6
lines changed

5 files changed

+63
-6
lines changed

Menu/Buttons.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ public static class Buttons
8181
new ButtonInfo { buttonText = "Exit Settings", method =() => CurrentCategoryName = "Main", isTogglable = false, toolTip = "Returns you back to the main page."},
8282

8383
new ButtonInfo { buttonText = "Menu Settings", method =() => CurrentCategoryName = "Menu Settings", isTogglable = false, toolTip = "Opens the settings for the menu."},
84+
new ButtonInfo { buttonText = "Category Settings", method = Settings.CategorySettings, isTogglable = false, toolTip = "Opens the settings for the categories."},
8485

8586
new ButtonInfo { buttonText = "Keybind Settings", method =() => CurrentCategoryName = "Keybind Settings", isTogglable = false, toolTip = "Opens the settings for the keybinds."},
8687
new ButtonInfo { buttonText = "Rebind Settings", method =() => CurrentCategoryName = "Rebind Settings", isTogglable = false, toolTip = "Opens the settings for rebinds."},

Menu/Main.cs

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public static void OnLaunch()
163163
catch (Exception exc)
164164
{
165165
LogManager.LogError(
166-
$"Error with Settings.LoadPlugins() at {exc.StackTrace}: {exc.Message}");
166+
$"Error with PluginManager.LoadPlugins() at {exc.StackTrace}: {exc.Message}");
167167
}
168168

169169
try
@@ -2964,6 +2964,17 @@ public static GameObject CreateMenu()
29642964
}
29652965
else switch (Buttons.CurrentCategoryName)
29662966
{
2967+
case "Main":
2968+
{
2969+
List<ButtonInfo> buttons = new List<ButtonInfo>();
2970+
foreach (var button in Buttons.buttons[Buttons.CurrentCategoryIndex])
2971+
{
2972+
if (!skipButtons.Contains(button.buttonText))
2973+
buttons.Add(button);
2974+
}
2975+
renderButtons = buttons.ToArray();
2976+
break;
2977+
}
29672978
case "Favorite Mods":
29682979
{
29692980
foreach (var favoriteMod in favorites.Where(favoriteMod => Buttons.GetIndex(favoriteMod) == null).ToList())
@@ -6535,6 +6546,15 @@ public static int DisplayedItemCount
65356546
count = enabledMods.Count - 1;
65366547
}
65376548

6549+
if (Buttons.CurrentCategoryName == "Main")
6550+
{
6551+
foreach (var button in Buttons.buttons[Buttons.CurrentCategoryIndex])
6552+
{
6553+
if (skipButtons.Contains(button.buttonText))
6554+
count--;
6555+
}
6556+
}
6557+
65386558
if (!isSearching) return count;
65396559
{
65406560
List<ButtonInfo> searchedMods = new List<ButtonInfo>();
@@ -6565,7 +6585,8 @@ public static int DisplayedItemCount
65656585
if (((Buttons.categoryNames[categoryIndex].Contains("Admin") ||
65666586
Buttons.categoryNames[categoryIndex] == "Mod Givers") &&
65676587
!isAdmin)
6568-
|| (v.detected && !allowDetected))
6588+
|| (v.detected && !allowDetected)
6589+
|| (Buttons.CurrentCategoryName == "Main" && skipButtons.Contains(v.buttonText)))
65696590
continue;
65706591

65716592
string displayedText = v.overlapText ?? v.buttonText;
@@ -6902,6 +6923,7 @@ public static string currentCategoryName
69026923
public static Texture2D customWatermark;
69036924

69046925
public static readonly List<string> favorites = new List<string> { "Exit Favorite Mods" };
6926+
public static readonly List<string> skipButtons = new List<string> { };
69056927
public static bool translate;
69066928

69076929
public static string serverLink = "https://discord.gg/iidk";

Mods/CustomMaps/Manager.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
using System.IO;
3131
using System.Linq;
3232
using System.Reflection;
33-
using static iiMenu.Menu.Main;
3433

3534
namespace iiMenu.Mods.CustomMaps
3635
{

Mods/Settings.cs

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,27 @@ public static void SpectatePlayer(VRRig rig)
645645
PromptSingle("<https://.mat>", () => Object.Destroy(cameraObject), "Done");
646646
}
647647

648+
public static void CategorySettings()
649+
{
650+
List<ButtonInfo> buttons = new List<ButtonInfo> {new ButtonInfo { buttonText = "Exit Menu Settings", method =() => Buttons.CurrentCategoryName = "Settings", isTogglable = false, toolTip = "Returns you back to the settings menu."}};
651+
652+
foreach (var button in Buttons.buttons[Buttons.GetCategory("Main")])
653+
{
654+
buttons.Add(new ButtonInfo
655+
{
656+
buttonText = $"Category{button.buttonText.Hash()}",
657+
overlapText = button.buttonText,
658+
enabled = !skipButtons.Contains(button.buttonText),
659+
enableMethod =() => skipButtons.Remove(button.buttonText),
660+
disableMethod =() => skipButtons.Add(button.buttonText),
661+
toolTip = "Toggles the visibility of the category " + button.buttonText + "."
662+
});
663+
}
664+
665+
Buttons.buttons[Buttons.GetCategory("Temporary Category")] = buttons.ToArray();
666+
Buttons.CurrentCategoryName = "Temporary Category";
667+
}
668+
648669
public static void RightHand()
649670
{
650671
rightHand = true;
@@ -5955,7 +5976,9 @@ public static string SavePreferencesToText()
59555976
}
59565977
}
59575978
}
5958-
5979+
5980+
string skipButtonString = string.Join(seperator, skipButtons);
5981+
59595982
string finaltext =
59605983
enabledtext + "\n" +
59615984
favoritetext + "\n" +
@@ -5965,7 +5988,8 @@ public static string SavePreferencesToText()
59655988
fontCycle + "\n" +
59665989
bindingtext + "\n" +
59675990
quickActionString + "\n" +
5968-
rebindingtext;
5991+
rebindingtext + "\n" +
5992+
skipButtonString;
59695993

59705994
return finaltext;
59715995
}
@@ -6253,6 +6277,17 @@ public static void LoadPreferencesFromText(string text)
62536277
}
62546278
} catch { }
62556279

6280+
try
6281+
{
6282+
skipButtons.Clear();
6283+
foreach (string skipButton in textData[9].Split(";;"))
6284+
{
6285+
ButtonInfo button = Buttons.GetIndex(skipButton);
6286+
if (button != null)
6287+
skipButtons.Add(skipButton);
6288+
}
6289+
} catch { }
6290+
62566291
hasLoadedPreferences = true;
62576292
}
62586293

PluginInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class PluginInfo
2626
public const string GUID = "org.iidk.gorillatag.iimenu";
2727
public const string Name = "ii's Stupid Menu";
2828
public const string Description = "Created by @crimsoncauldron with love <3";
29-
public const string BuildTimestamp = "2026-02-08T04:10:45Z";
29+
public const string BuildTimestamp = "2026-02-08T04:58:23Z";
3030
public const string Version = "8.2.4";
3131

3232
public const string BaseDirectory = "iisStupidMenu";

0 commit comments

Comments
 (0)