diff options
author | Stijn Buys <ingar@osirion.org> | 2008-10-12 17:27:00 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-10-12 17:27:00 +0000 |
commit | 574bf11742c40203a4433c0b69264014b10b5a96 (patch) | |
tree | 5fdaa40d22c38e5d8cce47d43a1a892008322598 /src/client | |
parent | b417df720584c101f3799874a0c836a543a8d0a8 (diff) |
container widget
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/chat.cc | 7 | ||||
-rw-r--r-- | src/client/chat.h | 2 | ||||
-rw-r--r-- | src/client/client.cc | 4 | ||||
-rw-r--r-- | src/client/input.cc | 6 |
4 files changed, 8 insertions, 11 deletions
diff --git a/src/client/chat.cc b/src/client/chat.cc index bdeebe2..87ba437 100644 --- a/src/client/chat.cc +++ b/src/client/chat.cc @@ -15,7 +15,7 @@ namespace client { -Chat::Chat(ui::Widget *parent) : ui::Widget(parent) +Chat::Chat(ui::Widget *parent) : ui::Window(parent) { set_label("chat"); history.clear(); @@ -42,10 +42,7 @@ Chat::~Chat() void Chat::show() { - Widget::show(); - - raise(); - set_focus(); + Window::show(); history_pos = history.rbegin(); (*history_pos).clear(); diff --git a/src/client/chat.h b/src/client/chat.h index 0bef2b4..f076075 100644 --- a/src/client/chat.h +++ b/src/client/chat.h @@ -16,7 +16,7 @@ namespace client { -class Chat : public ui::Widget +class Chat : public ui::Window { public: Chat(ui::Widget *parent = 0); diff --git a/src/client/client.cc b/src/client/client.cc index ac4c0e3..ae4f232 100644 --- a/src/client/client.cc +++ b/src/client/client.cc @@ -206,7 +206,7 @@ void Client::frame(float seconds) } else { // show the main menu on non-interactive modules if (!core::game()->interactive() && !ui::root()->active()) { - ui::root()->show_window("main"); + ui::root()->show_menu("main"); } } @@ -243,7 +243,7 @@ void Client::shutdown() void Client::notify_connect() { - ui::root()->hide_window(); + ui::root()->hide_menu(); } void Client::notify_disconnect() diff --git a/src/client/input.cc b/src/client/input.cc index d2c290b..22fd1c0 100644 --- a/src/client/input.cc +++ b/src/client/input.cc @@ -504,7 +504,7 @@ void key_pressed(Key *key) } else { if (ui::root()->active()) { - ui::root()->hide_window(); + ui::root()->hide_menu(); local_direction = 0.0f; local_pitch = 0.0f; local_roll = 0.0f; @@ -513,9 +513,9 @@ void key_pressed(Key *key) render::Camera::set_pitch(0.0f); } else { if (core::application()->connected()) { - ui::root()->show_window("game"); + ui::root()->show_menu("game"); } else { - ui::root()->show_window("main"); + ui::root()->show_menu("main"); } } } |