From 56cdfd3822d2800abdd2f912ab7f76a5764793a7 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 19 Oct 2008 13:45:07 +0000 Subject: scrollpane widget, updated chatbox --- src/client/console.h | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) (limited to 'src/client/console.h') diff --git a/src/client/console.h b/src/client/console.h index c567d70..40bf4c1 100644 --- a/src/client/console.h +++ b/src/client/console.h @@ -8,8 +8,9 @@ #define __INCLUDED_CLIENT_CONSOLE_H__ #include "sys/consoleinterface.h" -#include "ui/window.h" #include "ui/inputbox.h" +#include "ui/scrollpane.h" +#include "ui/window.h" namespace client { @@ -29,8 +30,6 @@ public: /// client system console widget class Console : public ui::Window { public: - typedef std::deque Text; - Console(Widget *parent); virtual ~Console(); @@ -49,30 +48,24 @@ public: void toggle(); protected: - /// draw event - virtual void event_draw(); - /// draw the client console text + /// draw the client console virtual void draw(); /// handle keypress events virtual bool on_keypress(const int key, const unsigned int modifier); private: - inline Text & log() { return con_buffer.log(); } - // input history - Text history; - Text::reverse_iterator history_pos; - - // scroll position - size_t console_scroll; + ui::Text history; + ui::Text::reverse_iterator history_pos; - // input widget - ui::InputBox *console_input; + // console widget + ui::InputBox *console_input; + ui::ScrollPane *console_scrollpane; // console buffer - static ConsoleBuffer con_buffer; + static ConsoleBuffer con_buffer; }; } -- cgit v1.2.3