aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Attorney_Online_remake.pro2
-rw-r--r--aoapplication.h3
-rw-r--r--courtroom.cpp36
-rw-r--r--text_file_functions.cpp21
4 files changed, 31 insertions, 31 deletions
diff --git a/Attorney_Online_remake.pro b/Attorney_Online_remake.pro
index 74013bc5..fc457181 100644
--- a/Attorney_Online_remake.pro
+++ b/Attorney_Online_remake.pro
@@ -13,7 +13,7 @@ RC_ICONS = logo.ico
TARGET = Attorney_Online_remake
TEMPLATE = app
-VERSION = 2.3.3.0
+VERSION = 2.3.4.0
SOURCES += main.cpp\
lobby.cpp \
diff --git a/aoapplication.h b/aoapplication.h
index f4ebb922..3a9d2e93 100644
--- a/aoapplication.h
+++ b/aoapplication.h
@@ -114,6 +114,7 @@ public:
pos_size_type get_element_dimensions(QString p_identifier, QString p_file);
int get_font_size(QString p_identifier, QString p_file);
QColor get_color(QString p_identifier, QString p_file);
+ QString get_sfx(QString p_identifier, QString p_file);
QString read_char_ini(QString p_char, QString p_search_line, QString target_tag, QString terminator_tag);
QString get_char_side(QString p_char);
QString get_showname(QString p_char);
@@ -136,7 +137,7 @@ public:
private:
const int RELEASE = 2;
const int MAJOR_VERSION = 3;
- const int MINOR_VERSION = 3;
+ const int MINOR_VERSION = 4;
QString user_theme = "default";
diff --git a/courtroom.cpp b/courtroom.cpp
index 4af4d205..5f462712 100644
--- a/courtroom.cpp
+++ b/courtroom.cpp
@@ -349,14 +349,10 @@ void Courtroom::set_widgets()
ui_vp_objection->combo_resize(ui_viewport->width(), ui_viewport->height());
set_size_and_pos(ui_ic_chatlog, "ic_chatlog");
- ui_ic_chatlog->setStyleSheet("QPlainTextEdit{ background-color: rgba(0, 0, 0, 0);"
- "color: white; }");
set_size_and_pos(ui_ms_chatlog, "ms_chatlog");
- ui_ms_chatlog->setStyleSheet("QTextBrowser{ background-color: rgba(0, 0, 0, 0); }");
set_size_and_pos(ui_server_chatlog, "server_chatlog");
- ui_server_chatlog->setStyleSheet("QTextBrowser{ background-color: rgba(0, 0, 0, 0); }");
set_size_and_pos(ui_mute_list, "mute_list");
ui_mute_list->hide();
@@ -365,7 +361,6 @@ void Courtroom::set_widgets()
//ui_area_list->setStyleSheet("background-color: rgba(0, 0, 0, 0);");
set_size_and_pos(ui_music_list, "music_list");
- ui_music_list->setStyleSheet("QListWidget{background-color: rgba(0, 0, 0, 0);}");
if (is_ao2_bg)
{
@@ -521,23 +516,11 @@ void Courtroom::set_widgets()
void Courtroom::set_fonts()
{
set_font(ui_vp_showname, "showname");
-
- /*
- int id = QFontDatabase::addApplicationFont(":/resource/fonts/Ace-Attorney.ttf");
- QString family = QFontDatabase::applicationFontFamilies(id).at(0);
- QFont monospace(family);
- monospace.setPointSize(ao_app->get_font_size("message", design_file));
- ui_vp_message->setFont(monospace);
- */
set_font(ui_vp_message, "message");
set_font(ui_ic_chatlog, "ic_chatlog");
set_font(ui_ms_chatlog, "ms_chatlog");
set_font(ui_server_chatlog, "server_chatlog");
set_font(ui_music_list, "music_list");
-
-
-
-
}
void Courtroom::set_font(QWidget *widget, QString p_identifier)
@@ -548,7 +531,7 @@ void Courtroom::set_font(QWidget *widget, QString p_identifier)
widget->setFont(QFont("Sans", f_weight));
- QColor f_color = ao_app->get_color(p_identifier + "_color", design_file);\
+ QColor f_color = ao_app->get_color(p_identifier + "_color", design_file);
QString style_sheet_string = class_name + " { background-color: rgba(0, 0, 0, 0);\n" +
"color: rgba(" +
@@ -558,14 +541,7 @@ void Courtroom::set_font(QWidget *widget, QString p_identifier)
qDebug() << "style_sheet_string: " << style_sheet_string;
- //widget->setStyleSheet(style_sheet_string);
-
- ui_ic_chatlog->setStyleSheet("QPlainTextEdit { background-color: rgba(0, 0, 0, 0);"
- "color: rgba(" +
- QString::number(f_color.red()) + ", " +
- QString::number(f_color.green()) + ", " +
- QString::number(f_color.blue()) + ", 255); }");
-
+ widget->setStyleSheet(style_sheet_string);
}
void Courtroom::set_window_title(QString p_title)
@@ -1095,7 +1071,7 @@ void Courtroom::handle_chatmessage_3()
{
realization_timer->start(60);
ui_vp_realization->show();
- sfx_player->play("sfx-realization.wav");
+ sfx_player->play(ao_app->get_sfx("realization", "courtroom_sounds.ini"));
}
}
@@ -1492,10 +1468,12 @@ void Courtroom::handle_song(QStringList *p_contents)
void Courtroom::handle_wtce(QString p_wtce)
{
+ QString sfx_file = "courtroom_sounds.ini";
+
//witness testimony
if (p_wtce == "testimony1")
{
- sfx_player->play("sfx-testimony2.wav");
+ sfx_player->play(ao_app->get_sfx("witness_testimony", sfx_file));
ui_vp_wtce->play("witnesstestimony");
testimony_in_progress = true;
show_testimony();
@@ -1503,7 +1481,7 @@ void Courtroom::handle_wtce(QString p_wtce)
//cross examination
else if (p_wtce == "testimony2")
{
- sfx_player->play("sfx-testimony.wav");
+ sfx_player->play(ao_app->get_sfx("cross_examination", sfx_file));
ui_vp_wtce->play("crossexamination");
testimony_in_progress = false;
}
diff --git a/text_file_functions.cpp b/text_file_functions.cpp
index f80e1b36..b43fa2eb 100644
--- a/text_file_functions.cpp
+++ b/text_file_functions.cpp
@@ -295,6 +295,27 @@ QColor AOApplication::get_color(QString p_identifier, QString p_file)
return return_color;
}
+QString AOApplication::get_sfx(QString p_identifier, QString p_file)
+{
+ QString design_ini_path = get_theme_path() + p_file;
+ QString default_path = get_default_theme_path() + p_file;
+ QString f_result = read_design_ini(p_identifier, design_ini_path);
+
+ QString return_sfx = "";
+
+ if (f_result == "")
+ {
+ f_result = read_design_ini(p_identifier, default_path);
+
+ if (f_result == "")
+ return return_sfx;
+ }
+
+ return_sfx = f_result;
+
+ return return_sfx;
+}
+
//returns whatever is to the right of "search_line =" within target_tag and terminator_tag, trimmed
//returns the empty string if the search line couldnt be found
QString AOApplication::read_char_ini(QString p_char, QString p_search_line, QString target_tag, QString terminator_tag)