diff options
author | Stijn Buys <ingar@osirion.org> | 2008-10-15 20:33:15 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-10-15 20:33:15 +0000 |
commit | 1e0df536c2fae85c317ce9c3cc17603d5f98c911 (patch) | |
tree | 3ab262d51451cda3e926e9581b294f08d39031d9 /src/client/chat.cc | |
parent | 97fca172fd51270cebd5b722f861a6c753bd4d2a (diff) |
moved client console into a Widget
Diffstat (limited to 'src/client/chat.cc')
-rw-r--r-- | src/client/chat.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/client/chat.cc b/src/client/chat.cc index 87ba437..6d294ba 100644 --- a/src/client/chat.cc +++ b/src/client/chat.cc @@ -6,15 +6,14 @@ #include "auxiliary/functions.h" #include "client/chat.h" -#include "client/client.h" -#include "client/console.h" #include "core/core.h" -#include "render/render.h" #include "sys/sys.h" #include "ui/ui.h" namespace client { +const size_t DEFAULT_MAX_HISTO_LINES = 512; + Chat::Chat(ui::Widget *parent) : ui::Window(parent) { set_label("chat"); @@ -83,7 +82,7 @@ bool Chat::on_keypress(const int key, const unsigned int modifier) (*history_pos).assign(chat_input->text()); // store input into history - while (history.size() >= MAXHISTOLINES) { + while (history.size() >= DEFAULT_MAX_HISTO_LINES) { history.pop_front(); } @@ -127,7 +126,7 @@ bool Chat::on_keypress(const int key, const unsigned int modifier) void Chat::event_draw() { - if (!client()->connected()) { + if (!core::application()->connected()) { hide(); return; } |