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')
-rw-r--r--src/client/chat.cc7
-rw-r--r--src/client/chat.h2
-rw-r--r--src/client/client.cc4
-rw-r--r--src/client/input.cc6
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");
}
}
}