diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/aoapplication.h | 48 | ||||
| -rw-r--r-- | include/aobutton.h | 4 | ||||
| -rw-r--r-- | include/aoimage.h | 7 | ||||
| -rw-r--r-- | include/aolayer.h | 2 | ||||
| -rw-r--r-- | include/aooptionsdialog.h | 5 | ||||
| -rw-r--r-- | include/courtroom.h | 2 |
6 files changed, 40 insertions, 28 deletions
diff --git a/include/aoapplication.h b/include/aoapplication.h index e76ad68..9a070d4 100644 --- a/include/aoapplication.h +++ b/include/aoapplication.h @@ -130,9 +130,7 @@ public: // implementation in path_functions.cpp QString get_base_path(); QString get_data_path(); - QString get_theme_path(QString p_file); - QString get_default_theme_path(QString p_file); - QString get_custom_theme_path(QString p_theme, QString p_file); + QString get_theme_path(QString p_file, QString p_theme=""); QString get_character_path(QString p_char, QString p_file); QString get_misc_path(QString p_misc, QString p_file); QString get_sounds_path(QString p_file); @@ -140,6 +138,14 @@ public: QString get_background_path(QString p_file); QString get_default_background_path(QString p_file); QString get_evidence_path(QString p_file); + QStringList get_asset_paths(QString p_element, QString p_theme="", QString p_subtheme="", QString p_default_theme="", QString p_misc="", QString p_character="", QString p_placeholder=""); + QString get_asset_path(QStringList pathlist); + QString get_image_path(QStringList pathlist, bool static_image=false); + QString get_sfx_path(QStringList pathlist); + QString get_config_value(QString p_identifier, QString p_config, QString p_theme="", QString p_subtheme="", QString p_default_theme="", QString p_misc=""); + QString get_asset(QString p_element, QString p_theme="", QString p_subtheme="", QString p_default_theme="", QString p_misc="", QString p_character="", QString p_placeholder=""); + QString get_image(QString p_element, QString p_theme="", QString p_subtheme="", QString p_default_theme="", QString p_misc="", QString p_character="", QString p_placeholder=""); + QString get_sfx(QString p_sfx, QString p_misc="", QString p_character=""); QString get_case_sensitive_path(QString p_file); ////// Functions for reading and writing files ////// @@ -306,10 +312,7 @@ public: // Returns the value to you QString get_design_element(QString p_identifier, QString p_file, - QString p_char = ""); - - // Returns the name of the font with p_identifier from p_file - QString get_font_name(QString p_identifier, QString p_file); + QString p_misc = ""); // Returns the value of font_size with p_identifier from p_file int get_font_size(QString p_identifier, QString p_file); @@ -323,19 +326,15 @@ public: // Returns the color from the misc folder. QColor get_chat_color(QString p_identifier, QString p_chat); - // Returns the sfx with p_identifier from sounds.ini in the current theme path - QString get_sfx(QString p_identifier, QString p_misc="default"); + // Returns the sfx with p_identifier from courtroom_sounds.ini in the current theme path + QString get_court_sfx(QString p_identifier, QString p_misc=""); // Figure out if we can opus this or if we should fall back to wav QString get_sfx_suffix(QString sound_to_check); // Can we use APNG for this? If not, WEBP? If not, GIF? If not, fall back to // PNG. - QString get_image_suffix(QString path_to_check); - - // If this image is static and non-animated, return the supported static image - // formats. Currently only PNG. - QString get_static_image_suffix(QString path_to_check); + QString get_image_suffix(QString path_to_check, bool static_image=false); // Returns the value of p_search_line within target_tag and terminator_tag QString read_char_ini(QString p_char, QString p_search_line, @@ -372,9 +371,6 @@ public: // Returns the value of chat font size from the specific p_char's ini file int get_chat_size(QString p_char); - // Returns the value of shouts from the specified p_char's ini file - QString get_char_shouts(QString p_char); - // Returns the preanim duration of p_char's p_emote int get_preanim_duration(QString p_char, QString p_emote); @@ -385,10 +381,6 @@ public: // Not in use int get_text_delay(QString p_char, QString p_emote); - // Get the effects folder referenced by the char.ini, read it and return the - // list of filenames in a string - QStringList get_theme_effects(); - // Get the theme's effects folder, read it and return the list of filenames in // a string QStringList get_effects(QString p_char); @@ -488,6 +480,18 @@ public: // Get if automatic logging is enabled bool get_auto_logging_enabled(); + // Get the subtheme from settings + QString get_subtheme(); + + // Get if the theme is animated + bool get_animated_theme(); + + // Currently defined subtheme + QString subtheme; + + QString default_theme = "default"; + QString current_theme = default_theme; + // The file name of the log file in base/logs. QString log_filename; @@ -505,8 +509,6 @@ private: const int MAJOR_VERSION = 9; const int MINOR_VERSION = 0; - QString current_theme = "default"; - QVector<server_type> server_list; QVector<server_type> favorite_list; diff --git a/include/aobutton.h b/include/aobutton.h index f575885..f1ae8b7 100644 --- a/include/aobutton.h +++ b/include/aobutton.h @@ -5,6 +5,7 @@ #include <QDebug> #include <QPushButton> +#include <QMovie> class AOButton : public QPushButton { Q_OBJECT @@ -14,8 +15,9 @@ public: ~AOButton(); AOApplication *ao_app; + QMovie *movie; - void set_image(QString p_image); + void set_image(QString p_image, QString p_misc=""); }; #endif // AOBUTTON_H diff --git a/include/aoimage.h b/include/aoimage.h index 01ef854..70ff1fc 100644 --- a/include/aoimage.h +++ b/include/aoimage.h @@ -7,6 +7,7 @@ #include <QDebug> #include <QLabel> +#include <QMovie> class AOImage : public QLabel { public: @@ -15,9 +16,11 @@ public: QWidget *m_parent; AOApplication *ao_app; + QMovie *movie; - bool set_image(QString p_image); - bool set_chatbox(QString p_path); + QString path; + + bool set_image(QString p_image, QString p_misc = ""); void set_size_and_pos(QString identifier); }; diff --git a/include/aolayer.h b/include/aolayer.h index 6b4fb1f..c32da02 100644 --- a/include/aolayer.h +++ b/include/aolayer.h @@ -85,7 +85,7 @@ public: // iterate through a list of paths and return the first entry that exists. if // none exist, return NULL (safe because we check again for existence later) - QString find_image(QList<QString> p_list); + QString find_image(QStringList p_list); protected: AOApplication *ao_app; diff --git a/include/aooptionsdialog.h b/include/aooptionsdialog.h index b128ce2..31f3d66 100644 --- a/include/aooptionsdialog.h +++ b/include/aooptionsdialog.h @@ -45,7 +45,11 @@ private: QFormLayout *ui_gameplay_form; QLabel *ui_theme_label; QComboBox *ui_theme_combobox; + QLabel *ui_subtheme_label; + QComboBox *ui_subtheme_combobox; QPushButton *ui_theme_reload_button; + QLabel *ui_animated_theme_lbl; + QCheckBox *ui_animated_theme_cb; QFrame *ui_theme_log_divider; QLabel *ui_downwards_lbl; QCheckBox *ui_downwards_cb; @@ -173,6 +177,7 @@ public slots: void discard_pressed(); void button_clicked(QAbstractButton *button); void on_reload_theme_clicked(); + void theme_changed(int i); }; #endif // AOOPTIONSDIALOG_H diff --git a/include/courtroom.h b/include/courtroom.h index 43a0910..eb1aa7b 100644 --- a/include/courtroom.h +++ b/include/courtroom.h @@ -505,7 +505,7 @@ private: QVector<QColor> default_color_rgb_list; // Get a color index from an arbitrary misc config - void gen_char_rgb_list(QString p_char); + void gen_char_rgb_list(QString p_misc); QVector<QColor> char_color_rgb_list; // Misc we used for the last message, and the one we're using now. Used to avoid loading assets when it's not needed |
