|
VoltMod
C++23 framework for CS2 server plugins
|
A spawned Panorama layout created by ScreenManager. More...
#include <Screen.hpp>
Public Member Functions | |
| Screen () | |
| ~Screen () | |
| Screen (Screen &&) noexcept | |
| Screen & | operator= (Screen &&) noexcept |
| Screen (const Screen &)=delete | |
| Screen & | operator= (const Screen &)=delete |
| operator bool () const | |
| bool | EnsureSpawned (int slot) |
| void | SetText (int slot, std::string_view variable, std::string_view value) |
| void | SetClass (int slot, std::string_view elementId, std::string_view className, bool on) |
| void | SetHidden (int slot, std::string_view elementId, bool hidden) |
| void | SetModifier (int slot, std::string_view elementId, std::string_view block, std::span< const std::string_view > names, std::string_view name) |
| void | ShowCursor (int slot, bool shown) |
| void | Remove () |
Friends | |
| class | ScreenManager |
A spawned Panorama layout created by ScreenManager.
Shared screens write for EveryoneSlot or a selected player. Player screens are networked only to their owner and remain visible while the owner is dead or spectating.
Writes do not spawn the entity. Call EnsureSpawned before drawing; it also respawns after a map change. Unchanged values are not resent, and a failed write is logged once per slot and retried on the next change. Destruction removes the entity. Operations are inert unless ScreenManager::Available succeeds.
Definition at line 22 of file Screen.hpp.
|
default |
Construct an empty screen. Writes do nothing until an entity is assigned.
|
default |
|
defaultnoexcept |
Spawn or respawn until slot can be written to. False logs why once per attempt.
Definition at line 25 of file Screen.cpp.
References EnsureSpawned().
Referenced by EnsureSpawned().
|
explicit |
Definition at line 20 of file Screen.cpp.
Replace the entity, removing the one previously held by this screen.
| void VoltMod::Screen::Remove | ( | ) |
Remove the entity now. The next EnsureSpawned creates a new one.
Definition at line 70 of file Screen.cpp.
| void VoltMod::Screen::SetClass | ( | int | slot, |
| std::string_view | elementId, | ||
| std::string_view | className, | ||
| bool | on | ||
| ) |
Definition at line 38 of file Screen.cpp.
Referenced by VoltMod::PanoramaMenuLayout::SetHomeVisible(), and VoltMod::PanoramaMenuLayout::SetSidebarVisible().
Definition at line 46 of file Screen.cpp.
Referenced by VoltMod::PanoramaMenuLayout::SetRow(), VoltMod::PanoramaMenuLayout::SetTab(), and VoltMod::PanoramaMenuLayout::Show().
| void VoltMod::Screen::SetModifier | ( | int | slot, |
| std::string_view | elementId, | ||
| std::string_view | block, | ||
| std::span< const std::string_view > | names, | ||
| std::string_view | name | ||
| ) |
Turn <block>--<name> on for elementId and every other of names off, such as an icon set's shown icon or a bar's step. names is the generated header's IconSetNames or BarNames.
Definition at line 51 of file Screen.cpp.
Set the text a text="{s:variable}" Label shows, for slot or EveryoneSlot.
Definition at line 30 of file Screen.cpp.
Referenced by VoltMod::PanoramaMenuLayout::SetEmpty(), VoltMod::PanoramaMenuLayout::SetFooter(), VoltMod::PanoramaMenuLayout::SetHeader(), VoltMod::PanoramaMenuLayout::SetPager(), and VoltMod::PanoramaMenuLayout::SetPrompt().
Definition at line 62 of file Screen.cpp.
Referenced by VoltMod::PanoramaMenuLayout::Hide().
|
friend |
Definition at line 58 of file Screen.hpp.