HoverRace
2.0
|
Player status change (join / leave) announcement. More...
#include <PlayerStatusAnnouncement.h>
Classes | |
struct | Status |
Public Member Functions | |
PlayerStatusAnnouncement (Status::status_t status, std::shared_ptr< Player::Player > target, std::shared_ptr< Player::Player > subject) | |
Constructor. More... | |
virtual | ~PlayerStatusAnnouncement () |
std::shared_ptr< Display::Box > | CreateIcon (Display::Display &display, Display::Container &parent) const override |
Create the optional icon to display next to the announcement. More... | |
Status::status_t | GetStatus () const |
![]() | |
Announcement (const std::string &postType, const std::string &label, std::shared_ptr< Player::Player > player) | |
Constructor. More... | |
virtual | ~Announcement () |
const std::string & | GetLabel () const |
std::shared_ptr< Player::Player > | GetPlayer () const |
const std::string & | GetPostType () const |
virtual void | OnClick () |
Handle when the announcement is clicked. More... | |
Announcement & | operator= (const Announcement &)=delete |
virtual std::ostream & | StreamOut (std::ostream &os) const |
Static Protected Member Functions | |
static std::string | RenderStatusText (Status::status_t status, const Player::Player &player) |
Generate the announcement text for the status. More... | |
Private Types | |
using | SUPER = MessageAnnouncement |
Private Attributes | |
Status::status_t | status |
std::shared_ptr< Player::Player > | subject |
Additional Inherited Members |
Player status change (join / leave) announcement.
HoverRace::Client::PlayerStatusAnnouncement::PlayerStatusAnnouncement | ( | Status::status_t | status, |
std::shared_ptr< Player::Player > | target, | ||
std::shared_ptr< Player::Player > | subject | ||
) |
Constructor.
status | The player status. |
target | The target player (may not be nullptr ). |
subject | The subject player (may not be nullptr ). |
|
inlinevirtual |
|
overridevirtual |
Create the optional icon to display next to the announcement.
display | The display the announcement will appear on. |
parent | The container the icon will be added to. |
nullptr
). Reimplemented from HoverRace::Client::MessageAnnouncement.
|
inline |
|
staticprotected |
Generate the announcement text for the status.
status | The player status. |
subject | The subject player. |
|
private |
|
private |