Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-10-12 14:55:10 +0000
committerStijn Buys <ingar@osirion.org>2008-10-12 14:55:10 +0000
commitb417df720584c101f3799874a0c836a543a8d0a8 (patch)
treefb7105ed662f13753a6ab8d3efb047bad04f2316 /src/client/chat.h
parent18383a5fc596bf9546f14d7393ee66c57720b116 (diff)
user interface updates, work-in-progress
Diffstat (limited to 'src/client/chat.h')
-rw-r--r--src/client/chat.h46
1 files changed, 27 insertions, 19 deletions
diff --git a/src/client/chat.h b/src/client/chat.h
index fdf4c70..0bef2b4 100644
--- a/src/client/chat.h
+++ b/src/client/chat.h
@@ -7,35 +7,43 @@
#ifndef __INCLUDED_CLIENT_CHAT_H__
#define __INCLUDED_CLIENT_CHAT_H__
-#include "sys/consoleinterface.h"
-
#include <sstream>
#include <deque>
-namespace client {
+#include "ui/input.h"
+#include "ui/label.h"
+#include "ui/window.h"
-/// the client chatbox
-namespace chat {
+namespace client {
-/// initialize chatbox functions
-void init();
+class Chat : public ui::Widget
+{
+public:
+ Chat(ui::Widget *parent = 0);
+ ~Chat();
-/// shut down chatbox functions
-void shutdown();
+ virtual void show();
+ void toggle();
-/// draw the chatbox
-void draw();
+protected:
+ virtual void event_draw();
+ virtual void resize();
+
+ virtual bool on_keypress(const int key, const unsigned int modifier);
+
-/// toggle the chatbox
-void toggle();
+private:
+ ui::Label *chat_label;
+ ui::Input *chat_input;
+
+ typedef std::deque<std::string> History;
+
+ History history;
+ History::reverse_iterator history_pos;
+};
-/// handle keyboard input
-void keypressed(unsigned int key);
-/// true of the console is visible
-bool visible();
-}
+} // namespace client
-}
#endif // __INCLUDED_CLIENT_CHAT_H__