mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-02-18 02:41:55 +00:00
Add CS2-SimpleAdmin documentation site
Introduces a new documentation site for CS2-SimpleAdmin using Docusaurus, including developer API references, tutorials, user guides, and module documentation. Removes the CleanModule example and updates FunCommands and ExampleModule. Also updates main plugin and API files to support new documentation and module structure.
This commit is contained in:
@@ -151,6 +151,18 @@ public interface ICS2_SimpleAdminApi
|
||||
/// <param name="commandName">Command name for permission override checking (optional, e.g., "css_god").</param>
|
||||
void RegisterMenu(string categoryId, string menuId, string menuName, Func<CCSPlayerController, object> menuFactory, string? permission = null, string? commandName = null);
|
||||
|
||||
/// <summary>
|
||||
/// Registers a menu in a category with automatic context passing.
|
||||
/// RECOMMENDED: Use this overload to eliminate duplication of categoryId and menuName in factory methods.
|
||||
/// </summary>
|
||||
/// <param name="categoryId">The category to add this menu to.</param>
|
||||
/// <param name="menuId">Unique identifier for the menu.</param>
|
||||
/// <param name="menuName">Display name of the menu.</param>
|
||||
/// <param name="menuFactory">Factory function that receives player and menu context.</param>
|
||||
/// <param name="permission">Required permission to access this menu (optional).</param>
|
||||
/// <param name="commandName">Command name for permission override checking (optional, e.g., "css_god").</param>
|
||||
void RegisterMenu(string categoryId, string menuId, string menuName, Func<CCSPlayerController, MenuContext, object> menuFactory, string? permission = null, string? commandName = null);
|
||||
|
||||
/// <summary>
|
||||
/// Unregisters a menu from a category.
|
||||
/// </summary>
|
||||
@@ -161,11 +173,29 @@ public interface ICS2_SimpleAdminApi
|
||||
/// </summary>
|
||||
object CreateMenuWithBack(string title, string categoryId, CCSPlayerController player);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a menu with an automatic back button using menu context.
|
||||
/// RECOMMENDED: Use this overload when calling from a context-aware menu factory to avoid title/category duplication.
|
||||
/// </summary>
|
||||
/// <param name="context">Menu context containing title and category information.</param>
|
||||
/// <param name="player">The player who will see the menu.</param>
|
||||
object CreateMenuWithBack(MenuContext context, CCSPlayerController player);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a menu with a list of players with filter and action.
|
||||
/// </summary>
|
||||
object CreateMenuWithPlayers(string title, string categoryId, CCSPlayerController admin, Func<CCSPlayerController, bool> filter, Action<CCSPlayerController, CCSPlayerController> onSelect);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a menu with a list of players using menu context.
|
||||
/// RECOMMENDED: Use this overload when calling from a context-aware menu factory to avoid title/category duplication.
|
||||
/// </summary>
|
||||
/// <param name="context">Menu context containing title and category information.</param>
|
||||
/// <param name="admin">The admin player opening the menu.</param>
|
||||
/// <param name="filter">Filter function to determine which players to show.</param>
|
||||
/// <param name="onSelect">Action to execute when a player is selected.</param>
|
||||
object CreateMenuWithPlayers(MenuContext context, CCSPlayerController admin, Func<CCSPlayerController, bool> filter, Action<CCSPlayerController, CCSPlayerController> onSelect);
|
||||
|
||||
/// <summary>
|
||||
/// Adds an option to the menu (extension method helper).
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user