Skip to the content.

MenuBuddy

A complete MonoGame library for building menu systems and managing game state transitions. Based on the NetworkStateManagement samples from the golden age of XNA.

NuGet License: MIT

Features

Quick Install

dotnet add package MenuBuddy

Minimal Example

using MenuBuddy;
using Microsoft.Xna.Framework;

public class MyGame : MouseGame
{
    public MyGame()
    {
        VirtualResolution = new Point(1280, 720);
        ScreenResolution = new Point(1280, 720);
    }

    public override IScreen[] GetMainMenuScreenStack()
    {
        return new IScreen[] { new MainMenuScreen() };
    }
}

public class MainMenuScreen : MenuStackScreen
{
    public MainMenuScreen() : base("Main Menu") { }

    public override async Task LoadContent()
    {
        await base.LoadContent();

        var startButton = new MenuEntry("Start Game", Content);
        startButton.OnClick += (sender, e) =>
        {
            ScreenManager.AddScreen(new GameplayScreen());
        };
        AddMenuEntry(startButton);
    }
}

Documentation

Page Description
Getting Started Installation, setup, and your first menu
Architecture High-level design and class relationships
Screens Screen types, lifecycle, and management
Widgets Labels, buttons, sliders, dropdowns, and more
Layouts Absolute, stack, relative, scroll, padded, and tree layouts
Styling Global theming with the StyleSheet class
Transitions Screen transition effects and animation
Input Controller, mouse, and touch input handling
API Reference Complete interface and class reference

Dependencies

MenuBuddy depends on several companion libraries, all installed automatically via NuGet:

Sample Project

For a complete working example, see MenuBuddySample.

License

MIT License – see LICENSE for details.