diff options
| author | oldmud0 <oldmud0@users.noreply.github.com> | 2020-05-22 19:17:55 -0500 |
|---|---|---|
| committer | oldmud0 <oldmud0@users.noreply.github.com> | 2020-05-22 19:17:55 -0500 |
| commit | fd1855b8d0ecaa56ae3165ad5d8f3bd65ff77a64 (patch) | |
| tree | 9c27d658dd8f19e649e1742b0fd39104a50a3ca6 /src/charselect.cpp | |
| parent | 8928aa2718378bc42d20d5bbe6c17be68d65d6f3 (diff) | |
| parent | 4617e3135ed14a28c4129154486022947fda9d82 (diff) | |
Merge KFO source unconditionally into AO2
Diffstat (limited to 'src/charselect.cpp')
| -rw-r--r-- | src/charselect.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/charselect.cpp b/src/charselect.cpp index c207d57..de9748b 100644 --- a/src/charselect.cpp +++ b/src/charselect.cpp @@ -70,15 +70,15 @@ void Courtroom::set_char_select() ao_app->get_element_dimensions("char_select", filename); if (f_charselect.width < 0 || f_charselect.height < 0) { - qDebug() - << "W: did not find courtroom width or height in courtroom_design.ini!"; + qDebug() << "W: did not find char_select width or height in " + "courtroom_design.ini!"; this->resize(714, 668); } else this->resize(f_charselect.width, f_charselect.height); ui_char_select_background->resize(f_charselect.width, f_charselect.height); - ui_char_select_background->set_image("charselect_background.png"); + ui_char_select_background->set_image("charselect_background"); filter_character_list(); @@ -133,14 +133,17 @@ void Courtroom::char_clicked(int n_char) return; } - if (n_char == m_cid) { - enter_courtroom(m_cid); - } - else { + if (n_char != m_cid) { + ao_app->send_server_packet( + new AOPacket("PW#" + ui_char_password->text() + "#%")); ao_app->send_server_packet( new AOPacket("CC#" + QString::number(ao_app->s_pv) + "#" + QString::number(n_char) + "#" + get_hdid() + "#%")); } + else + update_character(n_char); + + enter_courtroom(); ui_ic_chat_name->setPlaceholderText(char_list.at(n_char).name); } @@ -225,8 +228,9 @@ void Courtroom::character_loading_finished() 100); ao_app->w_lobby->set_loading_value(loading_value); ao_app->w_lobby->set_loading_text( - "Generating chars:\n" + QString::number(ao_app->generated_chars) + - "/" + QString::number(ao_app->char_list_size)); + tr("Generating chars:\n%1/%2") + .arg(QString::number(ao_app->generated_chars)) + .arg(QString::number(ao_app->char_list_size))); } } |
