Standadize button position

This commit is contained in:
Atony committed 2025-10-25 12:17:44 -05:00
1 parent ee22b776eb
commit 43f92d4dc2
2 files changed
+6 -2

No files matched your search

+2
View File
@@ -112,6 +112,8 @@ public static class HudManagerPatches
Error($"Failed to create custom button {button.GetType().Name}: {e}");
}
}
__instance.ImpostorVentButton.transform.SetParent(null);
__instance.ImpostorVentButton.transform.SetParent(BottomRight.transform);
gridArrange.Start();
gridArrange.ArrangeChilds();
+4 -2
View File
@@ -127,17 +127,19 @@ internal static class PlayerControlPatches
return;
}
var role = __instance.Data?.Role;
foreach (var button in CustomButtonManager.CustomButtons)
{
if (__instance.Data?.Role == null)
if (role == null)
{
continue;
}
try
{
if (!button.Enabled(__instance.Data?.Role))
if (!button.Enabled(role))
{
button.SetActive(false, role);
continue;
}