0 of 0

File information

Last updated

Original upload

Created by

Khloe Leclair

Uploaded by

KhloeLeclair

Virus scan

Safe to use

About this mod

A replacement for the built-in pause menu that's more efficient and easier for other mods to work with.

Requirements
Permissions and credits
Changelogs
Better Game Menu is a drop in replacement for the game's built-in pause menu (which is internally called GameMenu) that's focused on performance and extensibility.


New Features
  • Context menus for tabs! Other mods can register context menu entries. Additionally, if multiple mods try to register an implementation for a page, you can use the context menu to switch between them on the fly. If you use Generic Mod Config Menu, try right-clicking the Options tab.
  • Error handling! If one of the pages of the menu has an error, it doesn't break the entire menu.


Performance
The game's built-in pause menu is pretty bad for performance for a couple of reasons:

  • Every time you open the pause menu, it loads every tab of the menu at once, before you even try to use them.
  • There's a long list of events that cause any open pause menus to completely close and re-open themselves, including things like changing the UI zoom, resizing the game window, and viewing certain sub-menus.

Better Game Menu addresses these issues by only loading pages when you actually use them.

Additionally, there are mods that work by replacing menu pages with custom implementations. Many of those function by replacing tabs after they were already created, meaning some pages get loaded more than once. With Better Game Menu's API, that is no longer an issue.

Testers with large mod sets have reported significant improvements in the time it takes their pause menu to open.

Extensibility
The game's built-in pause menu is very troublesome to extend. Everything is hard-coded, and mods that add custom pages need to do an excessive amount of work just to make things work. Compatibility between multiple mods is a big issue too.

Better Game Menu has a comprehensive API that makes it easy for other mods to work with it. Adding a custom page goes from being a huge ordeal with event handlers and harmony patches to a single function call. Replacing built-in menu pages is also a single function call.

Compatibility

Known Issues
  • Better Game Menu looks just like the existing pause menu, but it's an entirely new implementation. As such, C# mods that interact with the pause menu will need to be updated to work with it. There's a GitHub Issue for tracking compatibility, and I am doing my best to work with developers of existing mods to get them updated.

See Also