|
VoltMod
C++23 framework for CS2 server plugins
|
Re-sends a center-HTML panel until stopped, since CS2 drops center HTML on death, a team switch and HUD updates. render runs on every send, so live values stay current.
More...
#include <CenterHtml.hpp>
Public Member Functions | |
| CenterHtml (Messages &messages, Scheduler &scheduler, SlotEvents &slots) | |
| void | Show (int slot, int refreshMs, std::function< std::string(int slot)> render) |
| void | Stop (int slot) |
| void | StopAll () |
Re-sends a center-HTML panel until stopped, since CS2 drops center HTML on death, a team switch and HUD updates. render runs on every send, so live values stay current.
Definition at line 19 of file CenterHtml.hpp.
| VoltMod::CenterHtml::CenterHtml | ( | Messages & | messages, |
| Scheduler & | scheduler, | ||
| SlotEvents & | slots | ||
| ) |
slots stops a panel when its player leaves. All must outlive this.
Definition at line 10 of file CenterHtml.cpp.
| void VoltMod::CenterHtml::Show | ( | int | slot, |
| int | refreshMs, | ||
| std::function< std::string(int slot)> | render | ||
| ) |
Send render(slot) to slot every refreshMs, replacing any panel shown.
Definition at line 14 of file CenterHtml.cpp.
References VoltMod::IsValidSlot(), VoltMod::ReadFile(), VoltMod::Scheduler::Repeat(), VoltMod::Messages::SendCenterHtml(), and Stop().
Stop and clear the panel; safe when nothing is shown.
Definition at line 29 of file CenterHtml.cpp.
References VoltMod::Messages::ClearCenterHtml(), VoltMod::IsValidSlot(), and VoltMod::ReadFile().
| void VoltMod::CenterHtml::StopAll | ( | ) |
Definition at line 39 of file CenterHtml.cpp.
References VoltMod::MaxPlayers, VoltMod::ReadFile(), and Stop().