From e964cbb2e00121e9d4fea4a76a09e9af960ca56e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 19 Oct 2013 00:03:04 +0300 Subject: move virtual member calls from speechbubble constuctor into postInit. --- src/being/being.cpp | 2 ++ src/gui/popups/speechbubble.cpp | 3 +++ src/gui/popups/speechbubble.h | 2 ++ 3 files changed, 7 insertions(+) (limited to 'src') diff --git a/src/being/being.cpp b/src/being/being.cpp index 7271a06c2..556341062 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -182,6 +182,8 @@ Being::Being(const int id, const Type type, const uint16_t subtype, mAway(false), mInactive(false) { + mSpeechBubble->postInit(); + for (int f = 0; f < 20; f ++) { mSpriteRemap[f] = f; diff --git a/src/gui/popups/speechbubble.cpp b/src/gui/popups/speechbubble.cpp index 989ebb551..ad043b9bf 100644 --- a/src/gui/popups/speechbubble.cpp +++ b/src/gui/popups/speechbubble.cpp @@ -47,7 +47,10 @@ SpeechBubble::SpeechBubble() : mSpeechBox->setOpaque(false); mSpeechBox->setForegroundColorAll(getThemeColor(Theme::BUBBLE_TEXT), getThemeColor(Theme::BUBBLE_TEXT_OUTLINE)); +} +void SpeechBubble::postInit() +{ add(mCaption); add(mSpeechBox); } diff --git a/src/gui/popups/speechbubble.h b/src/gui/popups/speechbubble.h index 3753ee82d..3ea93fce0 100644 --- a/src/gui/popups/speechbubble.h +++ b/src/gui/popups/speechbubble.h @@ -41,6 +41,8 @@ class SpeechBubble final : public Popup A_DELETE_COPY(SpeechBubble) + void postInit(); + /** * Sets the name displayed for the speech bubble, and in what color. */ -- cgit v1.2.3-70-g09d2