summaryrefslogtreecommitdiff
path: root/src/guichan/widgets/label.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/guichan/widgets/label.cpp')
-rw-r--r--src/guichan/widgets/label.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/guichan/widgets/label.cpp b/src/guichan/widgets/label.cpp
index 03ca04576..3e0eecb3c 100644
--- a/src/guichan/widgets/label.cpp
+++ b/src/guichan/widgets/label.cpp
@@ -56,16 +56,14 @@
namespace gcn
{
- Label::Label()
+ Label::Label() : mAlignment(Graphics::LEFT)
{
- mAlignment = Graphics::LEFT;
}
- Label::Label(const std::string& caption)
+ Label::Label(const std::string& caption) :
+ mCaption(caption),
+ mAlignment(Graphics::LEFT)
{
- mCaption = caption;
- mAlignment = Graphics::LEFT;
-
setWidth(getFont()->getWidth(caption));
setHeight(getFont()->getHeight());
}