summaryrefslogtreecommitdiff
path: root/src/gui/statuswindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-10-20 02:23:16 +0300
committerAndrei Karas <akaras@inbox.ru>2012-10-20 13:55:43 +0300
commit0153e8fa499b7bbdd712339bfb3921ead15a37a2 (patch)
tree0e12bc130aa40d3bc41f86e16754f060b450977e /src/gui/statuswindow.cpp
parent4c7a11b639ec94c8a32a9a52e99652c464745037 (diff)
downloadplus-0153e8fa499b7bbdd712339bfb3921ead15a37a2.tar.gz
plus-0153e8fa499b7bbdd712339bfb3921ead15a37a2.tar.bz2
plus-0153e8fa499b7bbdd712339bfb3921ead15a37a2.tar.xz
plus-0153e8fa499b7bbdd712339bfb3921ead15a37a2.zip
Add palette inheritance to label class.
Diffstat (limited to 'src/gui/statuswindow.cpp')
-rw-r--r--src/gui/statuswindow.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/gui/statuswindow.cpp b/src/gui/statuswindow.cpp
index 0b7bd63f4..d47d5928f 100644
--- a/src/gui/statuswindow.cpp
+++ b/src/gui/statuswindow.cpp
@@ -131,11 +131,11 @@ StatusWindow::StatusWindow() :
Window(player_node ? player_node->getName() :
"?", false, nullptr, "status.xml"),
gcn::ActionListener(),
- mLvlLabel(new Label(strprintf(_("Level: %d"), 0))),
- mMoneyLabel(new Label(strprintf(_("Money: %s"), ""))),
- mHpLabel(new Label(_("HP:"))),
+ mLvlLabel(new Label(this, strprintf(_("Level: %d"), 0))),
+ mMoneyLabel(new Label(this, strprintf(_("Money: %s"), ""))),
+ mHpLabel(new Label(this, _("HP:"))),
mMpLabel(nullptr),
- mXpLabel(new Label(_("Exp:"))),
+ mXpLabel(new Label(this, _("Exp:"))),
mHpBar(nullptr),
mMpBar(nullptr),
mXpBar(nullptr),
@@ -146,7 +146,7 @@ StatusWindow::StatusWindow() :
mAttrScroll(new ScrollArea(mAttrCont, false)),
mDAttrCont(new VertContainer(this, 32)),
mDAttrScroll(new ScrollArea(mDAttrCont, false)),
- mCharacterPointsLabel(new Label("C")),
+ mCharacterPointsLabel(new Label(this, "C")),
mCorrectionPointsLabel(nullptr),
mCopyButton(new Button(this, _("Copy to chat"), "copy", this))
{
@@ -189,7 +189,7 @@ StatusWindow::StatusWindow() :
if (magicBar)
{
max = PlayerInfo::getAttribute(PlayerInfo::MAX_MP);
- mMpLabel = new Label(_("MP:"));
+ mMpLabel = new Label(this, _("MP:"));
mMpBar = new ProgressBar(max ? static_cast<float>(
PlayerInfo::getAttribute(PlayerInfo::MAX_MP))
/ static_cast<float>(max) : static_cast<float>(0),
@@ -221,8 +221,8 @@ StatusWindow::StatusWindow() :
if (job)
{
- mJobLvlLabel = new Label(strprintf(_("Job: %d"), 0));
- mJobLabel = new Label(_("Job:"));
+ mJobLvlLabel = new Label(this, strprintf(_("Job: %d"), 0));
+ mJobLabel = new Label(this, _("Job:"));
mJobBar = new ProgressBar(0.0f, 80, 0, Theme::PROG_JOB);
place(5, 0, mJobLvlLabel, 3);
@@ -257,7 +257,7 @@ StatusWindow::StatusWindow() :
if (Net::getPlayerHandler()->canCorrectAttributes())
{
- mCorrectionPointsLabel = new Label("C");
+ mCorrectionPointsLabel = new Label(this, "C");
place(0, 7, mCorrectionPointsLabel, 5);
}
@@ -757,8 +757,8 @@ AttrDisplay::AttrDisplay(const Widget2 *const widget,
mId(id),
mName(name),
mLayout(new LayoutHelper(this)),
- mLabel(new Label(name)),
- mValue(new Label("1 "))
+ mLabel(new Label(this, name)),
+ mValue(new Label(this, "1 "))
{
setSize(100, 32);
@@ -803,7 +803,7 @@ ChangeDisplay::ChangeDisplay(const Widget2 *const widget,
AttrDisplay(widget, id, name),
gcn::ActionListener(),
mNeeded(1),
- mPoints(new Label(_("Max"))),
+ mPoints(new Label(this, _("Max"))),
mDec(nullptr),
mInc(new Button(this, _("+"), "inc", this))
{