From 11c2f258ebf48f515cdba5c7ae9cccec447604dd Mon Sep 17 00:00:00 2001 From: David Skoland Date: Fri, 16 Nov 2018 01:02:55 +0100 Subject: [PATCH] removed legacy for char icons --- aoapplication.h | 9 +++++---- aocharbutton.cpp | 10 +--------- courtroom.h | 2 +- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/aoapplication.h b/aoapplication.h index 0cb2c78..0fed8c9 100644 --- a/aoapplication.h +++ b/aoapplication.h @@ -98,16 +98,17 @@ public: //implementation in path_functions.cpp QString get_base_path(); QString get_data_path(); - QString get_theme_path(); - QString get_default_theme_path(); - QString get_character_path(QString p_character); + QString get_theme_path(QString p_file); + QString get_default_theme_path(QString p_file); + QString get_character_path(QString p_character, QString p_file); + QString get_character_emotions_path(QString p_character, QString p_file); QString get_demothings_path(); QString get_sounds_path(); QString get_music_path(QString p_song); QString get_background_path(); QString get_default_background_path(); QString get_evidence_path(); - QString get_case_sensitive_path(QString p_dir, QString p_file); + QString get_case_sensitive_path(QString p_file); ////// Functions for reading and writing files ////// // Implementations file_functions.cpp diff --git a/aocharbutton.cpp b/aocharbutton.cpp index 550e819..f7e7702 100644 --- a/aocharbutton.cpp +++ b/aocharbutton.cpp @@ -50,20 +50,12 @@ void AOCharButton::set_passworded() void AOCharButton::set_image(QString p_character) { - QString image_path = ao_app->get_character_path(p_character) + "char_icon.png"; - QString legacy_path = ao_app->get_demothings_path() + p_character.toLower() + "_char_icon.png"; - QString alt_path = ao_app->get_demothings_path() + p_character.toLower() + "_off.png"; + QString image_path = ao_app->get_character_path(p_character, "char_icon.png"); this->setText(""); if (file_exists(image_path)) this->setStyleSheet("border-image:url(\"" + image_path + "\")"); - else if (file_exists(legacy_path)) - { - this->setStyleSheet("border-image:url(\"" + legacy_path + "\")"); - //ninja optimization - QFile::copy(legacy_path, image_path); - } else { this->setStyleSheet("border-image:url()"); diff --git a/courtroom.h b/courtroom.h index 2cc099c..3c937b9 100644 --- a/courtroom.h +++ b/courtroom.h @@ -102,7 +102,7 @@ public: //implementations in path_functions.cpp QString get_background_path(); - QString get_default_background_path(); + QString get_default_background_path(QString p_file); //cid = character id, returns the cid of the currently selected character int get_cid() {return m_cid;}