diff options
| author | David Skoland <davidskoland@gmail.com> | 2017-02-09 15:41:14 +0100 |
|---|---|---|
| committer | David Skoland <davidskoland@gmail.com> | 2017-02-09 15:41:14 +0100 |
| commit | 01df52755cfad496ccc3be2f31e334234fb75cb2 (patch) | |
| tree | 04f60f109bb07dddeaee48beb748a4519a2de6e9 /courtroom.cpp | |
| parent | 49579cdb9cb162476b5402dced0b6af5844eb1ec (diff) | |
added base for mutelist
Diffstat (limited to 'courtroom.cpp')
| -rw-r--r-- | courtroom.cpp | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/courtroom.cpp b/courtroom.cpp index 5ba92bd5..0d398b3c 100644 --- a/courtroom.cpp +++ b/courtroom.cpp @@ -222,6 +222,8 @@ Courtroom::Courtroom(AOApplication *p_ao_app) : QMainWindow() connect(ui_realization, SIGNAL(clicked()), this, SLOT(on_realization_clicked())); + connect(ui_mute, SIGNAL(clicked()), this, SLOT(on_mute_clicked())); + connect(ui_defense_minus, SIGNAL(clicked()), this, SLOT(on_defense_minus_clicked())); connect(ui_defense_plus, SIGNAL(clicked()), this, SLOT(on_defense_plus_clicked())); connect(ui_prosecution_minus, SIGNAL(clicked()), this, SLOT(on_prosecution_minus_clicked())); @@ -749,8 +751,28 @@ void Courtroom::on_chat_return_pressed() packet_contents.append(ao_app->get_sfx_name(current_char, current_emote)); - packet_contents.append(QString::number(ao_app->get_emote_mod(current_char, current_emote))); + int f_emote_mod = ao_app->get_emote_mod(current_char, current_emote); + + if (ui_pre->isChecked()) + { + if (f_emote_mod == 0) + f_emote_mod = 1; + else if (f_emote_mod == 2) + f_emote_mod = 3; + else if (f_emote_mod == 5) + f_emote_mod = 4; + } + else + { + if (f_emote_mod == 1) + f_emote_mod = 0; + else if (f_emote_mod == 3) + f_emote_mod = 2; + else if (f_emote_mod == 4) + f_emote_mod = 5; + } + packet_contents.append(QString::number(f_emote_mod)); packet_contents.append(QString::number(m_cid)); packet_contents.append(QString::number(ao_app->get_sfx_delay(current_char, current_emote))); @@ -1353,7 +1375,6 @@ void Courtroom::on_music_search_edited(QString p_text) { //preventing compiler warnings p_text += "a"; - qDebug() << "music search edited"; list_music(); } @@ -1463,6 +1484,20 @@ void Courtroom::on_realization_clicked() ui_ic_chat_message->setFocus(); } +void Courtroom::on_mute_clicked() +{ + if (ui_mute_list->isHidden()) + { + ui_mute_list->show(); + ui_mute->set_image("mute_pressed.png"); + } + else + { + ui_mute_list->hide(); + ui_mute->set_image("mute.png"); + } +} + void Courtroom::on_defense_minus_clicked() { int f_state = defense_bar_state - 1; |
