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
7namespace CS2Kit::Menu
8{
9/** Renders the HTML for a menu, including its items and layout. */
10std::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. */
13std::string RenderCaptureOverlay(const std::string& menuTitle, std::string_view prompt);
14
15/** Generates the default header HTML for a menu. */
16std::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 */
24std::string DefaultFooter(bool isSubmenu, bool isPaginated);
25
26} // namespace CS2Kit::Menu
std::string RenderMenuHtml(const Menu *menu, int slot, int selectedIndex, bool isSubmenu)
std::string RenderCaptureOverlay(const std::string &menuTitle, std::string_view prompt)
std::string DefaultFooter(bool isSubmenu, bool isPaginated)
std::string DefaultHeader(const std::string &title, int currentPage, int totalPages)