AdminMenuButtonPositionFix
Fixes the Admin Menu button (h3nw-AdminMenuButton) overlapping REPOConfig's Mods button in the pause menu by spacing every pause-menu button evenly - with or without Active Moons showing.Admin Menu Button Position Fix
Fixes a visual bug in the pause menu: the Admin Menu button and REPOConfig's Mods button draw on top of each other (and on top of Main Menu once Active Moons is showing), with their text overlapping and hard to click.
Requires RepoAdminMenu (the admin panel itself), AdminMenuButton (adds the pause menu button) and MenuLib. They install automatically as dependencies.
In plain terms
Mods that add pause-menu buttons each pick their own fixed position, and nothing stops two of them picking the same spot. REPOConfig's Mods button and AdminMenuButton's Admin Menu button landed almost on top of each other - and when the vanilla "Active Moons" button appears partway through a run and pushes the menu down a row, there's no free gap left at all.
Every time the pause menu opens, this now spaces all the buttons between Continue and Quit Game evenly, keeping their order. Continue and Quit stay exactly where they are. It works with or without Active Moons, and with any number of mod buttons, not just these two.
It doesn't touch the admin menu itself - no permission changes, it still only opens for the host (or in single player).
For the technically curious
MenuLib's CreateREPOButton has no layout or collision handling; REPOConfig hardcodes Mods at (126, 65) and AdminMenuButton uses (126, 62). Vanilla rows are 32 units apart, and with Active Moons showing Main Menu sits at y = 91, so Main Menu, Admin Menu and Mods all overlap with no gap to aim for.
A postfix on MenuPageEsc.Start snapshots the buttons that exist at that moment. It runs inside MenuLib's own hook on that method, before MenuLib adds mod buttons, so those are exactly the vanilla buttons. The highest and lowest become the column's top and bottom (Continue and Quit Game). One frame later, every active MenuButton on the page within the column's x position and inside that span is spaced evenly. Each button's private originalButtonPosition cache (restored by MenuButton.ResizeToText) is updated along with its transform. Everything is wrapped so an unexpected layout leaves the menu alone rather than breaking MenuLib's button building. A one-time log line lists every button and its position.
Good to know
- Only changes where buttons are drawn; no effect on what any button does.
- Built and tested with RepoAdminMenu 1.0.16, AdminMenuButton 1.0.0, MenuLib 2.5.4 and REPOConfig 1.2.6 on R.E.P.O v0.4.4.3.
Credits
Made by RicketyWrecked. Not affiliated with the R.E.P.O developers, h3nw, proferabg or nickklmao. This is an unofficial layout fix.
Questions, bug reports, or suggestions: Discord.
