summaryrefslogtreecommitdiff
path: root/src/gui/beingpopup.cpp
diff options
context:
space:
mode:
authorBertram <bertram@cegetel.net>2010-03-03 23:38:18 +0100
committerBertram <bertram@cegetel.net>2010-03-03 23:38:18 +0100
commit1e52781e7d425cffcc6a5319b4cb5bf5eebe2ea9 (patch)
tree596305e9bfd4ad8448efd477a43f86490b1974c5 /src/gui/beingpopup.cpp
parent8cc31b582f372238ce6bd2c86888d312cf1fe5b2 (diff)
parentf5f7a7d5990d1133f714b6cd431aecf6a332fbd5 (diff)
downloadmana-client-1e52781e7d425cffcc6a5319b4cb5bf5eebe2ea9.tar.gz
mana-client-1e52781e7d425cffcc6a5319b4cb5bf5eebe2ea9.tar.bz2
mana-client-1e52781e7d425cffcc6a5319b4cb5bf5eebe2ea9.tar.xz
mana-client-1e52781e7d425cffcc6a5319b4cb5bf5eebe2ea9.zip
Merge branch 'master' of gitorious.org:mana/mana
Diffstat (limited to 'src/gui/beingpopup.cpp')
-rw-r--r--src/gui/beingpopup.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/gui/beingpopup.cpp b/src/gui/beingpopup.cpp
index 7fd99371..33fdff44 100644
--- a/src/gui/beingpopup.cpp
+++ b/src/gui/beingpopup.cpp
@@ -27,7 +27,7 @@
#include "gui/gui.h"
#include "gui/palette.h"
-#include "gui/widgets/textbox.h"
+#include "gui/widgets/label.h"
#include "utils/gettext.h"
#include "utils/stringutils.h"
@@ -39,14 +39,14 @@ BeingPopup::BeingPopup():
Popup("BeingPopup")
{
// Being Name
- mBeingName = new TextBox();
+ mBeingName = new Label("A");
mBeingName->setFont(boldFont);
mBeingName->setPosition(getPadding(), getPadding());
- const int fontHeight = getFont()->getHeight();
+ const int fontHeight = mBeingName->getHeight() + getPadding();
// Being's party
- mBeingParty = new TextBox();
+ mBeingParty = new Label("A");
mBeingParty->setPosition(getPadding(), fontHeight);
add(mBeingName);
@@ -69,12 +69,15 @@ void BeingPopup::show(int x, int y, Player *p)
if (!(p->getPartyName().empty()))
{
- mBeingName->setTextWrapped(p->getName(), 196);
- mBeingParty->setTextWrapped(strprintf(_("Party: %s"),
- p->getPartyName().c_str()), 196);
+ mBeingName->setCaption(p->getName());
+ mBeingName->adjustSize();
- int minWidth = std::max(mBeingName->getMinWidth(),
- mBeingParty->getMinWidth());
+ mBeingParty->setCaption(strprintf(_("Party: %s"),
+ p->getPartyName().c_str()));
+ mBeingParty->adjustSize();
+
+ int minWidth = std::max(mBeingName->getWidth(),
+ mBeingParty->getWidth());
const int height = getFont()->getHeight();