|
VoltMod
C++23 framework for CS2 server plugins
|
#include <MenuBuilder.hpp>
Public Member Functions | |
| MenuBuilder (std::string title) | |
| MenuBuilder & | Subtitle (std::string subtitle) |
| MenuBuilder & | Add (MenuItem item) |
| MenuBuilder & | Add (const MenuRowSpec auto &row) |
| MenuBuilder & | Button (std::string label, std::function< void(int slot)> activate) |
| MenuBuilder & | Submenu (std::string label, std::function< std::shared_ptr< Menu >(int slot)> build) |
| MenuBuilder & | Text (std::string label) |
| MenuBuilder & | EmptyText (std::string label) |
| std::shared_ptr< Menu > | Build () |
Fluent builder for menus and row specs.
Definition at line 160 of file MenuBuilder.hpp.
|
inlineexplicit |
Definition at line 163 of file MenuBuilder.hpp.
Referenced by Add(), Add(), Button(), EmptyText(), Submenu(), Subtitle(), and Text().
|
inline |
Appends any compatible row spec.
Definition at line 180 of file MenuBuilder.hpp.
References Add(), and MenuBuilder().
Referenced by Add().
|
inline |
Append a row built by hand.
Definition at line 173 of file MenuBuilder.hpp.
References MenuBuilder().
Referenced by VoltMod::AppendPlayerRows(), Button(), Submenu(), and Text().
|
inline |
Returns the built menu. The builder must not be reused after this.
Definition at line 205 of file MenuBuilder.hpp.
References Text().
Referenced by VoltMod::BuildPlayerPicker().
|
inline |
ButtonRow with nothing but a label and a callback.
Definition at line 183 of file MenuBuilder.hpp.
References Add(), and MenuBuilder().
Referenced by VoltMod::BuildConfirmMenu(), and VoltMod::BuildDurationMenu().
|
inline |
Sets a text row used only when no other rows were added.
Definition at line 198 of file MenuBuilder.hpp.
References MenuBuilder().
|
inline |
SubmenuRow with nothing but a label and a factory.
Definition at line 189 of file MenuBuilder.hpp.
References Add(), and MenuBuilder().
|
inline |
Sets optional plain-text detail shown with the title.
Definition at line 166 of file MenuBuilder.hpp.
References MenuBuilder(), and Subtitle().
Referenced by Subtitle().
|
inline |
TextRow: a heading or divider.
Definition at line 195 of file MenuBuilder.hpp.
References Add(), and MenuBuilder().
Referenced by VoltMod::AppendPlayerRows(), Build(), and VoltMod::BuildConfirmMenu().