From d197d1f50112ee658d3112d1c980b8e4228b5357 Mon Sep 17 00:00:00 2001 From: David Skoland Date: Fri, 27 Jan 2017 17:45:02 +0100 Subject: added some functionality to handle_chatmessage function --- courtroom.cpp | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'courtroom.cpp') diff --git a/courtroom.cpp b/courtroom.cpp index f408b14..0233fe7 100644 --- a/courtroom.cpp +++ b/courtroom.cpp @@ -177,7 +177,8 @@ void Courtroom::set_widgets() //viewport elements like background, desk, etc. go here set_size_and_pos(ui_ic_chatlog, "ic_chatlog"); - ui_ic_chatlog->setStyleSheet("background-color: rgba(0, 0, 0, 0);"); + ui_ic_chatlog->setStyleSheet("background-color: rgba(0, 0, 0, 0);" + "color: white;"); set_size_and_pos(ui_ms_chatlog, "ms_chatlog"); ui_ms_chatlog->setStyleSheet("background-color: rgba(0, 0, 0, 0);"); @@ -396,9 +397,14 @@ void Courtroom::set_char_select_page() for (int n_button = 0 ; n_button < chars_on_page ; ++n_button) { int n_real_char = n_button + current_char_page * 90; + AOCharButton *f_button = ui_char_button_list.at(n_button); - ui_char_button_list.at(n_button)->set_image(char_list.at(n_real_char).name); - ui_char_button_list.at(n_button)->show(); + f_button->reset(); + f_button->set_image(char_list.at(n_real_char).name); + f_button->show(); + + if (char_list.at(n_real_char).taken) + f_button->set_taken(); } } @@ -444,6 +450,16 @@ void Courtroom::append_server_chatmessage(QString f_message) ui_server_chatlog->appendPlainText(f_message); } +void Courtroom::handle_chatmessage(QStringList *p_contents) +{ + QString f_message = p_contents->at(2) + ": " + p_contents->at(4) + '\n'; + + ui_ic_chatlog->moveCursor(QTextCursor::Start); + ui_ic_chatlog->insertPlainText(f_message); + + //T0D0: play objection gif->preanimation if there is any +} + void Courtroom::on_ooc_return_pressed() { if (ui_ooc_chat_message->text() == "" || ui_ooc_chat_name->text() == "") -- cgit From b23e96728b3c8080d454100fb7db53ab46666e4e Mon Sep 17 00:00:00 2001 From: David Skoland Date: Sat, 28 Jan 2017 12:43:20 +0100 Subject: added server name in window title --- courtroom.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'courtroom.cpp') diff --git a/courtroom.cpp b/courtroom.cpp index 0233fe7..71ff16b 100644 --- a/courtroom.cpp +++ b/courtroom.cpp @@ -320,6 +320,11 @@ void Courtroom::set_widgets() } +void Courtroom::set_window_title(QString p_title) +{ + this->setWindowTitle(p_title); +} + void Courtroom::set_size_and_pos(QWidget *p_widget, QString p_identifier) { QString design_ini_path = ao_app->get_theme_path() + "courtroom_design.ini"; -- cgit