Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/chat.cc21
1 files changed, 4 insertions, 17 deletions
diff --git a/src/client/chat.cc b/src/client/chat.cc
index 8191e52..013d525 100644
--- a/src/client/chat.cc
+++ b/src/client/chat.cc
@@ -116,6 +116,7 @@ bool Chat::on_keypress(const int key, const unsigned int modifier)
if (chat_input->text().c_str()[0] == '/' || chat_input->text().c_str()[0] == '\\') {
core::cmd() << &chat_input->text().c_str()[1] << std::endl;
} else {
+ // FIXME semi-column ; truncates the command
core::cmd() << "say " << chat_input->text() << std::endl;
}
(*history.rbegin()) = chat_input->text();
@@ -166,23 +167,6 @@ bool Chat::on_keypress(const int key, const unsigned int modifier)
void Chat::draw()
{
- /*
- * this never worked before, event_draw is NOT virtual
-
- if (ui::console()->visible())
- return;
-
- if (!core::application()->connected()) {
- hide();
- return;
- }
-
- if (ui::root()->active()) {
- hide();
- return;
- }
- */
-
if (!chat_small && (chat_playerlist_timestamp != core::game()->playerlist_timestamp())) {
update_player_list();
}
@@ -197,8 +181,11 @@ void Chat::update_player_list()
for (core::GameInterface::Players::const_iterator it = core::game()->players().begin(); it != core::game()->players().end(); it++) {
ui::ListItem *listitem = new ui::ListItem(chat_playerlist, (*it)->name().c_str());
listitem->set_height(listitem->font()->height() * 1.5f);
+ listitem->set_sortkey(aux::text_strip_lowercase((*it)->name());
}
+ chat_playerlist->sort();
+
chat_playerlist_timestamp = core::game()->playerlist_timestamp();
}