|
VoltMod
C++23 framework for CS2 server plugins
|
Menus drawn as center HTML and driven with W/S/A/D/E/R. It needs no client addon, so runtime.Menus falls back to it for a player another surface cannot draw for. More...
#include <CenterHtmlMenu.hpp>
Classes | |
| struct | Services |
Public Member Functions | |
| CenterHtmlMenu (const Services &services) | |
| bool | OpenSession (int slot, std::shared_ptr< Menu > menu, MenuOptions options) override |
| void | Open (int slot, std::shared_ptr< Menu > menu) override |
| bool | IsOpen (int slot) const override |
| void | Close (int slot) override |
| void | CloseAll (int slot) override |
| void | CloseAll (int slot, std::string_view replyKey) override |
| void | Prompt (int slot, std::string prompt, std::function< bool(int slot, std::string_view text)> callback) override |
| std::string | Translate (int slot, std::string_view key, std::string_view fallback) const override |
| Public Member Functions inherited from VoltMod::MenuSurface | |
| virtual | ~MenuSurface ()=default |
| MenuSurface (const MenuSurface &)=delete | |
| MenuSurface & | operator= (const MenuSurface &)=delete |
Additional Inherited Members | |
| Protected Member Functions inherited from VoltMod::MenuSurface | |
| MenuSurface ()=default | |
Menus drawn as center HTML and driven with W/S/A/D/E/R. It needs no client addon, so runtime.Menus falls back to it for a player another surface cannot draw for.
Definition at line 30 of file CenterHtmlMenu.hpp.
|
explicit |
Definition at line 16 of file CenterHtmlMenu.cpp.
|
overridevirtual |
Pops the top menu, returning to its parent when one exists.
Implements VoltMod::MenuSurface.
Definition at line 72 of file CenterHtmlMenu.cpp.
References VoltMod::IsValidSlot().
|
overridevirtual |
Clears the stack and removes the menu from the player's screen.
Implements VoltMod::MenuSurface.
Definition at line 100 of file CenterHtmlMenu.cpp.
References VoltMod::IsValidSlot().
Referenced by CloseAll(), and OpenSession().
|
overridevirtual |
Translates and sends replyKey, then closes every menu.
Implements VoltMod::MenuSurface.
Definition at line 120 of file CenterHtmlMenu.cpp.
References CloseAll().
|
overridevirtual |
Implements VoltMod::MenuSurface.
Definition at line 141 of file CenterHtmlMenu.cpp.
|
overridevirtual |
Pushes menu onto slot's session and shows it, starting one with default options when none is open. What a row calls.
Implements VoltMod::MenuSurface.
Definition at line 37 of file CenterHtmlMenu.cpp.
References VoltMod::IsValidSlot(), and OpenSession().
|
overridevirtual |
Opens a session for slot showing menu, closing any the player has open here. What a command calls. False when this surface cannot draw for slot; nothing is left open then.
Implements VoltMod::MenuSurface.
Definition at line 22 of file CenterHtmlMenu.cpp.
References CloseAll(), VoltMod::MenuOptions::FreezeMovement, and VoltMod::IsValidSlot().
Referenced by Open().
|
overridevirtual |
Routes the next chat line to callback. Closing the menu cancels it.
Implements VoltMod::MenuSurface.
Definition at line 130 of file CenterHtmlMenu.cpp.
|
overridevirtual |
Translates key for slot, using fallback when missing.
Implements VoltMod::MenuSurface.
Definition at line 136 of file CenterHtmlMenu.cpp.