Fix showname placeholder text and shout button after changing characters (#147)
This commit is contained in:
parent
fc9fe6b34b
commit
949a323903
@ -144,8 +144,6 @@ void Courtroom::char_clicked(int n_char)
|
|||||||
update_character(n_char);
|
update_character(n_char);
|
||||||
|
|
||||||
enter_courtroom();
|
enter_courtroom();
|
||||||
|
|
||||||
ui_ic_chat_name->setPlaceholderText(char_list.at(n_char).name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Courtroom::put_button_in_place(int starting, int chars_on_this_page)
|
void Courtroom::put_button_in_place(int starting, int chars_on_this_page)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include "courtroom.h"
|
#include "courtroom.h"
|
||||||
|
|
||||||
Courtroom::Courtroom(AOApplication *p_ao_app) : QMainWindow()
|
Courtroom::Courtroom(AOApplication *p_ao_app) : QMainWindow()
|
||||||
{
|
{
|
||||||
@ -1264,6 +1264,9 @@ void Courtroom::update_character(int p_cid)
|
|||||||
else
|
else
|
||||||
ui_custom_objection->hide();
|
ui_custom_objection->hide();
|
||||||
|
|
||||||
|
if (m_cid != -1) // there is no name at char_list -1, and we crash if we try
|
||||||
|
// to find one
|
||||||
|
ui_ic_chat_name->setPlaceholderText(char_list.at(m_cid).name);
|
||||||
ui_char_select_background->hide();
|
ui_char_select_background->hide();
|
||||||
ui_ic_chat_message->setEnabled(m_cid != -1);
|
ui_ic_chat_message->setEnabled(m_cid != -1);
|
||||||
ui_ic_chat_message->setFocus();
|
ui_ic_chat_message->setFocus();
|
||||||
@ -1296,6 +1299,25 @@ void Courtroom::enter_courtroom()
|
|||||||
list_music();
|
list_music();
|
||||||
list_areas();
|
list_areas();
|
||||||
|
|
||||||
|
switch (
|
||||||
|
objection_state) // no need to reset these as it was done in set_widgets()
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
ui_hold_it->set_image("holdit_selected");
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
ui_objection->set_image("objection_selected");
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
ui_take_that->set_image("takethat_selected");
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
ui_custom_objection->set_image("custom_selected");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
music_player->set_volume(ui_music_slider->value(), 0); // set music
|
music_player->set_volume(ui_music_slider->value(), 0); // set music
|
||||||
// Set the ambience and other misc. music layers
|
// Set the ambience and other misc. music layers
|
||||||
for (int i = 1; i < music_player->m_channelmax; ++i) {
|
for (int i = 1; i < music_player->m_channelmax; ++i) {
|
||||||
@ -3223,7 +3245,9 @@ void Courtroom::on_ooc_return_pressed()
|
|||||||
if (ok) {
|
if (ok) {
|
||||||
if (whom > -1) {
|
if (whom > -1) {
|
||||||
other_charid = whom;
|
other_charid = whom;
|
||||||
QString msg = tr("You will now pair up with %1 if they also choose your character in return.").arg(char_list.at(whom).name);
|
QString msg = tr("You will now pair up with %1 if they also choose "
|
||||||
|
"your character in return.")
|
||||||
|
.arg(char_list.at(whom).name);
|
||||||
append_server_chatmessage("CLIENT", msg, "1");
|
append_server_chatmessage("CLIENT", msg, "1");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -3371,8 +3395,8 @@ void Courtroom::on_ooc_return_pressed()
|
|||||||
QString casestatus = casefile.value("status", "").value<QString>();
|
QString casestatus = casefile.value("status", "").value<QString>();
|
||||||
|
|
||||||
if (!caseauth.isEmpty())
|
if (!caseauth.isEmpty())
|
||||||
append_server_chatmessage(tr("CLIENT"), tr("Case made by %1.").arg(caseauth),
|
append_server_chatmessage(tr("CLIENT"),
|
||||||
"1");
|
tr("Case made by %1.").arg(caseauth), "1");
|
||||||
if (!casedoc.isEmpty())
|
if (!casedoc.isEmpty())
|
||||||
ao_app->send_server_packet(new AOPacket("CT#" + ui_ooc_chat_name->text() +
|
ao_app->send_server_packet(new AOPacket("CT#" + ui_ooc_chat_name->text() +
|
||||||
"#/doc " + casedoc + "#%"));
|
"#/doc " + casedoc + "#%"));
|
||||||
|
Loading…
Reference in New Issue
Block a user