diff options
author | Mattes D <github@xoft.cz> | 2020-04-13 18:38:06 +0200 |
---|---|---|
committer | Alexander Harkness <me@bearbin.net> | 2020-04-16 22:07:48 +0200 |
commit | 9ee47e59995f858ec531b3ee467f131594e4ba1f (patch) | |
tree | f005d8af4a0362d7eab8a96a71aca0d73275f8e1 /src/CompositeChat.h | |
parent | Prevent crash when breeding (diff) | |
download | cuberite-9ee47e59995f858ec531b3ee467f131594e4ba1f.tar cuberite-9ee47e59995f858ec531b3ee467f131594e4ba1f.tar.gz cuberite-9ee47e59995f858ec531b3ee467f131594e4ba1f.tar.bz2 cuberite-9ee47e59995f858ec531b3ee467f131594e4ba1f.tar.lz cuberite-9ee47e59995f858ec531b3ee467f131594e4ba1f.tar.xz cuberite-9ee47e59995f858ec531b3ee467f131594e4ba1f.tar.zst cuberite-9ee47e59995f858ec531b3ee467f131594e4ba1f.zip |
Diffstat (limited to '')
-rw-r--r-- | src/CompositeChat.h | 63 |
1 files changed, 48 insertions, 15 deletions
diff --git a/src/CompositeChat.h b/src/CompositeChat.h index ab16e9f72..a715d0402 100644 --- a/src/CompositeChat.h +++ b/src/CompositeChat.h @@ -43,6 +43,8 @@ public: ptShowAchievement, } ; + + class cBasePart { public: @@ -57,70 +59,101 @@ public: virtual ~cBasePart() {} } ; - class cTextPart : + + + class cTextPart: public cBasePart { - typedef cBasePart super; + using Super = cBasePart; + public: + cTextPart(const AString & a_Text, const AString & a_Style = ""); } ; - class cClientTranslatedPart : + + + class cClientTranslatedPart: public cBasePart { - typedef cBasePart super; + using Super = cBasePart; + public: + AStringVector m_Parameters; cClientTranslatedPart(const AString & a_TranslationID, const AStringVector & a_Parameters, const AString & a_Style = ""); } ; - class cUrlPart : + + + class cUrlPart: public cBasePart { - typedef cBasePart super; + using Super = cBasePart; + public: + AString m_Url; cUrlPart(const AString & a_Text, const AString & a_Url, const AString & a_Style = ""); } ; - class cCommandPart : + + + class cCommandPart: public cBasePart { - typedef cBasePart super; + using Super = cBasePart; + public: + AString m_Command; cCommandPart(ePartType a_PartType, const AString & a_Text, const AString & a_Command, const AString & a_Style = ""); } ; - class cRunCommandPart : + + + class cRunCommandPart: public cCommandPart { - typedef cCommandPart super; + using Super = cCommandPart; + public: + cRunCommandPart(const AString & a_Text, const AString & a_Command, const AString & a_Style = ""); } ; - class cSuggestCommandPart : + + + class cSuggestCommandPart: public cCommandPart { - typedef cCommandPart super; + using Super = cCommandPart; + public: + cSuggestCommandPart(const AString & a_Text, const AString & a_Command, const AString & a_Style = ""); } ; - class cShowAchievementPart : + + + class cShowAchievementPart: public cBasePart { - typedef cBasePart super; + using Super = cBasePart; + public: + AString m_PlayerName; cShowAchievementPart(const AString & a_PlayerName, const AString & a_Achievement, const AString & a_Style = ""); } ; - typedef std::vector<cBasePart *> cParts; + + + using cParts = std::vector<cBasePart *>; + /** Creates a new empty chat message. Exported manually due to the other overload needing a manual export. */ |