removed legacy for char icons
This commit is contained in:
parent
051c8975ec
commit
11c2f258eb
@ -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
|
||||
|
@ -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()");
|
||||
|
@ -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;}
|
||||
|
Loading…
Reference in New Issue
Block a user