CS2-Kit
C++23 library for CS2 Metamod:Source plugin development
Loading...
Searching...
No Matches
MenuRenderer.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <CS2Kit/Menu/Menu.hpp>
4
#include <string>
5
#include <string_view>
6
7
namespace
CS2Kit::Menu
8
{
9
/** Renders the HTML for a menu, including its items and layout. */
10
std::string
RenderMenuHtml
(
const
Menu* menu,
int
slot,
int
selectedIndex,
bool
isSubmenu);
11
12
/** Renders the chat-input capture overlay shown while a player is typing a value. */
13
std::string
RenderCaptureOverlay
(
const
std::string& menuTitle, std::string_view prompt);
14
15
/** Generates the default header HTML for a menu. */
16
std::string
DefaultHeader
(
const
std::string& title,
int
currentPage,
int
totalPages);
17
18
/**
19
* Generates the default footer HTML for a menu.
20
* @param isSubmenu True if this menu is a submenu (shows "Back" hint), false if it's a root menu (shows "Close" hint).
21
* @param isPaginated True if the menu has multiple pages of items (shows page navigation hints)
22
* @return The generated HTML string for the menu footer.
23
*/
24
std::string
DefaultFooter
(
bool
isSubmenu,
bool
isPaginated);
25
26
}
// namespace CS2Kit::Menu
CS2Kit::Menu
Definition
MenuManager.cpp:13
CS2Kit::Menu::RenderMenuHtml
std::string RenderMenuHtml(const Menu *menu, int slot, int selectedIndex, bool isSubmenu)
Definition
MenuRenderer.cpp:110
CS2Kit::Menu::RenderCaptureOverlay
std::string RenderCaptureOverlay(const std::string &menuTitle, std::string_view prompt)
Definition
MenuRenderer.cpp:148
CS2Kit::Menu::DefaultFooter
std::string DefaultFooter(bool isSubmenu, bool isPaginated)
Definition
MenuRenderer.cpp:38
CS2Kit::Menu::DefaultHeader
std::string DefaultHeader(const std::string &title, int currentPage, int totalPages)
Definition
MenuRenderer.cpp:23
src
Menu
MenuRenderer.hpp
Generated by
1.9.8