aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCrystalwarrior <varsash@gmail.com>2019-09-18 14:28:26 +0300
committerCrystalwarrior <varsash@gmail.com>2019-09-18 14:28:26 +0300
commitf8d3d5d8fdeda3d01595e02b7c616606be32f6aa (patch)
tree2e3642af327261ee477aa77d27aa0d86ce7df0e7
parent2d329cdbd27c19d958275fbf1c6862135c96a395 (diff)
Fix a bug with sound effect from misc/ folder not being read
Make an "effects_icon_size" entry in courtroom_design.ini for scaling the buttons in the effects list
-rw-r--r--src/courtroom.cpp7
-rw-r--r--src/text_file_functions.cpp2
2 files changed, 6 insertions, 3 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp
index 9083951c..bcf3a42a 100644
--- a/src/courtroom.cpp
+++ b/src/courtroom.cpp
@@ -619,8 +619,11 @@ void Courtroom::set_widgets()
set_size_and_pos(ui_effects_dropdown, "effects_dropdown");
ui_effects_dropdown->setInsertPolicy(QComboBox::InsertAtBottom);
ui_effects_dropdown->setToolTip(tr("Choose an effect to play on your next spoken message."));
- ui_effects_dropdown->setIconSize(QSize(16, 16)); //Todo: don't do hardcoding hell - make it part of courtroom_design.ini
- //Todo: actual list of effects
+ //Todo: recode this entire fucking system with these dumbass goddamn ini's why is everything so specifically coded for all these purposes
+ //is ABSTRACT CODING not a thing now huh what the FUCK why do I gotta do this pleASE FOR THE LOVE OF GOD SPARE ME FROM THIS FRESH HELL
+ //btw i still love coding.
+ QPoint p_point = ao_app->get_button_spacing("effects_icon_size", filename);
+ ui_effects_dropdown->setIconSize(QSize(p_point.x(), p_point.y()));
set_size_and_pos(ui_defense_bar, "defense_bar");
ui_defense_bar->set_image("defensebar" + QString::number(defense_bar_state));
diff --git a/src/text_file_functions.cpp b/src/text_file_functions.cpp
index 6c34c410..06caf291 100644
--- a/src/text_file_functions.cpp
+++ b/src/text_file_functions.cpp
@@ -884,7 +884,7 @@ QString AOApplication::get_effect(QString effect, QString p_char)
QString AOApplication::get_effect_sound(QString fx_name, QString p_char)
{
QString p_effect = read_char_ini(p_char, "effects", "Options");
- QString p_path = get_base_path() + "misc/effects/" + p_effect + "/effects.ini";
+ QString p_path = get_base_path() + "misc/" + p_effect + "/effects.ini";
QString design_ini_path = get_theme_path("effects/effects.ini");
QString default_path = get_default_theme_path("effects/effects.ini");