Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/chat.cc')
-rw-r--r--src/client/chat.cc9
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;
}