removed debug statements, fixed a chatbox issue
This commit is contained in:
parent
fd6fbc4b54
commit
bc2f15e4f1
@ -40,7 +40,8 @@ SOURCES += main.cpp\
|
||||
emotes.cpp \
|
||||
aosfxplayer.cpp \
|
||||
aomusicplayer.cpp \
|
||||
aoblipplayer.cpp
|
||||
aoblipplayer.cpp \
|
||||
evidence.cpp
|
||||
|
||||
HEADERS += lobby.h \
|
||||
aoimage.h \
|
||||
|
@ -21,8 +21,6 @@ void AOSfxPlayer::play(QString p_sfx, int p_volume, QString p_char)
|
||||
else
|
||||
f_path = ao_app->get_sounds_path() + p_sfx;
|
||||
|
||||
qDebug() << "sfx path: " << f_path;
|
||||
|
||||
m_stream = BASS_StreamCreateFile(FALSE, f_path.toStdString().c_str(), 0, 0, BASS_STREAM_AUTOFREE);
|
||||
|
||||
set_volume(p_volume);
|
||||
|
@ -287,11 +287,11 @@ Courtroom::Courtroom(AOApplication *p_ao_app) : QMainWindow()
|
||||
|
||||
set_widgets();
|
||||
|
||||
//in evidence.cpp
|
||||
construct_evidence();
|
||||
|
||||
//implementation in emotes.cpp
|
||||
construct_emotes();
|
||||
|
||||
connect(ui_emote_left, SIGNAL(clicked()), this, SLOT(on_emote_left_clicked()));
|
||||
connect(ui_emote_right, SIGNAL(clicked()), this, SLOT(on_emote_right_clicked()));
|
||||
}
|
||||
|
||||
void Courtroom::set_mute_list()
|
||||
@ -1019,7 +1019,7 @@ void Courtroom::handle_chatmessage_2()
|
||||
ui_vp_chatbox->set_image("chatmed.png");
|
||||
else
|
||||
{
|
||||
QString chatbox_path = ao_app->get_base_path() + "misc/" + chatbox;
|
||||
QString chatbox_path = ao_app->get_base_path() + "misc/" + chatbox + ".png";
|
||||
ui_vp_chatbox->set_image_from_path(chatbox_path);
|
||||
}
|
||||
|
||||
|
@ -171,6 +171,9 @@ private:
|
||||
int emote_rows = 2;
|
||||
int max_emotes_on_page = 10;
|
||||
|
||||
int current_evidence_page = 0;
|
||||
//int current_evidence
|
||||
|
||||
//is set to true if the bg folder contains defensedesk.png, prosecutiondesk.png and stand.png
|
||||
bool is_ao2_bg = false;
|
||||
|
||||
@ -286,7 +289,8 @@ private:
|
||||
void construct_emotes();
|
||||
void set_emote_page();
|
||||
|
||||
|
||||
void construct_evidence();
|
||||
void set_evidence_page();
|
||||
|
||||
public slots:
|
||||
void objection_done();
|
||||
|
@ -52,6 +52,9 @@ void Courtroom::construct_emotes()
|
||||
|
||||
set_size_and_pos(ui_emote_right, "emote_right");
|
||||
ui_emote_right->set_image("arrow_right.png");
|
||||
|
||||
connect(ui_emote_left, SIGNAL(clicked()), this, SLOT(on_emote_left_clicked()));
|
||||
connect(ui_emote_right, SIGNAL(clicked()), this, SLOT(on_emote_right_clicked()));
|
||||
}
|
||||
|
||||
void Courtroom::set_emote_page()
|
||||
|
19
evidence.cpp
Normal file
19
evidence.cpp
Normal file
@ -0,0 +1,19 @@
|
||||
#include "courtroom.h"
|
||||
|
||||
void Courtroom::construct_evidence()
|
||||
{
|
||||
//constructing emote button grid
|
||||
const int base_x_pos{10};
|
||||
const int base_y_pos{0};
|
||||
|
||||
const int x_modifier{49};
|
||||
int x_mod_count{0};
|
||||
|
||||
const int y_modifier{49};
|
||||
int y_mod_count{0};
|
||||
|
||||
emote_columns = ui_emotes->width() / x_modifier;
|
||||
emote_rows = ui_emotes->height() / y_modifier;
|
||||
|
||||
max_emotes_on_page = emote_columns * emote_rows;
|
||||
}
|
@ -260,12 +260,8 @@ QString AOApplication::get_pre_emote(QString p_char, int p_emote)
|
||||
{
|
||||
QString f_result = read_char_ini(p_char, QString::number(p_emote + 1), "[Emotions]", "[SoundN]");
|
||||
|
||||
qDebug() << "f_result" << f_result;
|
||||
|
||||
QStringList result_contents = f_result.split("#");
|
||||
|
||||
|
||||
|
||||
if (result_contents.size() < 4)
|
||||
{
|
||||
qDebug() << "W: misformatted char.ini: " << p_char << ", " << p_emote;
|
||||
|
Loading…
Reference in New Issue
Block a user