eGOMenu 1.0.1

dotnet add package eGOMenu --version 1.0.1
                    
NuGet\Install-Package eGOMenu -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="eGOMenu" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="eGOMenu" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="eGOMenu" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add eGOMenu --version 1.0.1
                    
#r "nuget: eGOMenu, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package eGOMenu@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=eGOMenu&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=eGOMenu&version=1.0.1
                    
Install as a Cake Tool

eGOMenu

eGOMenu is a lightweight, high-performance WASD menu library for CounterStrikeSharp (CS2).
It is designed to be easy to consume from other plugins while remaining fast, flexible, and fully extensible.


Overview

eGOMenu provides a simple API for building and displaying interactive menus using center HTML rendering (PrintToCenterHtml).

Menus are composed of lines and elements, support pagination automatically, and allow full control over behavior and layout.


Installation

NuGet

dotnet add package eGOMenu

Server Setup

Place the compiled DLL in: addons/counterstrikesharp/shared/eGOMenu/


Basic Usage (From a Plugin)

Create and open a menu from within your plugin:

var menu = WASDMenu.Create("Main Menu")
    .AddLine(l => l.AddButton("Start Game", p =>
    {
        p.PrintToChat("Game starting...");
    }))
    .AddLine(l => l.AddButton("Settings", p =>
    {
        MenuManager.Instance.OpenSubMenu(p, BuildSettingsMenu());
    }))
    .AddFooter("W/S = Navigate | E = Select | R = Back")
    .Build();

MenuManager.Instance.OpenMenu(player, menu);

Menus are created once and passed directly to the MenuManager. There is no required registration or capability system.

Submenus are handled automatically using a stack-based system.

private WASDMenu BuildSettingsMenu()
{
    return WASDMenu.Create("Settings")
        .AddLine(l => l.AddButton("Audio", p => { }))
        .AddLine(l => l.AddButton("Video", p => { }))
        .Build();
}

To open a submenu:

MenuManager.Instance.OpenSubMenu(player, submenu);

Behavior:

  • Back returns to the previous menu
  • Exit closes the entire menu stack
  • Each submenu preserves its own page and selection state

Menus are built using a fluent builder pattern:

WASDMenu.Create("Title")
    .AddLine(...)
    .AddFooter(...)
    .Build();

Each menu consists of:

  • Header (title)
  • Lines (collections of elements)
  • Footer (optional)
  • Automatic pagination when exceeding vertical limits

Elements

Button

.AddButton("Label", player =>
{
    // logic
})

Conditional / Disabled

.AddButton("Admin Only", p => { }, p => p.IsAdmin)

If the predicate returns false, the item is skipped during selection.

Spacer

.AddSpacer()

Useful for layout control.

Input Handling

eGOMenu uses a combination of:

  • OnPlayerButtonsChanged (event-driven input)
  • OnTick (for held key repeat)

This ensures:

  • Immediate response on press
  • Smooth scrolling when holding keys
  • Minimal overhead (only active menus are processed)

Default Controls

Action Key
Up W
Down S
Left A
Right D
Select E
Back R
Exit Space

Button mappings are configurable internally and can be extended if needed.

Rendering

Menus are rendered using:

player.PrintToCenterHtml(...)

Formatting is HTML-based and supports:

  • colors
  • font sizes
  • styling (bold, italic)

You can extend or replace the renderer if needed.

Architecture

  • WASDMenu
    • Immutable menu definition built via the fluent API
  • MenuManager
    • Singleton, responsible for managing active menus per player
  • MenuContext
    • Per-player runtime state (page, selection, submenu stack)
  • MenuFrame
    • Represents a single menu layer in the stack
  • PlayerButtonsListener
    • Handles input and key repeat logic

Extending

The system is designed to be extended from consumer plugins:

You can build:

  • custom elements (sliders, toggles, inputs)
  • dynamic menus generated at runtime
  • reusable menu builders
  • alternative renderers
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 136 4/6/2026
1.0.0 124 4/6/2026