mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-20 01:46:15 +00:00
Standadize button position
This commit is contained in:
1 parent
ee22b776eb
commit
43f92d4dc2
2 files changed
+6
-2
No files matched your search
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user