summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2011-06-05 18:21:12 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2011-06-05 18:21:12 +0200
commitd94e9e78af4e59e27524556b828291c1dfb72407 (patch)
treef4abde9e288756473d64e7245c5243142f69199b
parentb55f95d6868a6f8247e0133245dd17aaafafdaa4 (diff)
Fixed chatbox not being resizable when console is showing.
This was due to ConsoleWindow::update() setting focus on its editbox every frame. Focus is now only set in show().
-rw-r--r--gui.cpp4
-rw-r--r--gui.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/gui.cpp b/gui.cpp
index 4d4a723..df865ea 100644
--- a/gui.cpp
+++ b/gui.cpp
@@ -152,6 +152,10 @@ void ConsoleWindow::add_line(const char *line) {
void ConsoleWindow::update() {
MouseCursor::getSingleton().show();
+}
+
+void ConsoleWindow::show() {
+ GUI::show();
WindowManager::getSingleton().getWindow("console_editbox")->activate();
}
diff --git a/gui.h b/gui.h
index 5ea5063..aa9ccb8 100644
--- a/gui.h
+++ b/gui.h
@@ -44,6 +44,7 @@ class ConsoleWindow : public GUI {
virtual ~ConsoleWindow();
virtual void update();
+ virtual void show();
void add_line(const std::string& line);
void add_line(const char *line);