summaryrefslogtreecommitdiff
path: root/src/gui/window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/window.cpp')
-rw-r--r--src/gui/window.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/window.cpp b/src/gui/window.cpp
index eb886538..75208350 100644
--- a/src/gui/window.cpp
+++ b/src/gui/window.cpp
@@ -23,7 +23,7 @@
#include "gui.h"
#include <guichan/allegro.hpp>
-Window::Window(gcn::Container *parent, std::string text) :
+Window::Window(gcn::Container *parent, const std::string& text) :
caption(text),
mousePX(0),
mousePY(0),
@@ -112,6 +112,11 @@ void Window::draw(gcn::Graphics* graphics)
drawChildren(graphics);
}
+void Window::setTitle(const std::string& text)
+{
+ caption = std::string(text);
+}
+
void Window::setDimension(const gcn::Rectangle &dimension)
{
gcn::Container::setDimension(gcn::Rectangle(