From d45834561211bae5525135294f2f5e732ba80854 Mon Sep 17 00:00:00 2001 From: Crystalwarrior Date: Thu, 7 Jul 2022 13:59:34 +0300 Subject: Overlay emote_buttons with emote_selected image from theme instead of generating files (#727) * Create an "emote_selected" overlay for emote buttons using default theme's emote_selected image It is used if "_on" button image is not found on the character. If emote_selected image is missing from the default theme, use a simple transparent black color overlay instead. Replaces auto-generation of _off images * clang plz * use static overlays only --- include/aoemotebutton.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/aoemotebutton.h b/include/aoemotebutton.h index add9b43..edabfb6 100644 --- a/include/aoemotebutton.h +++ b/include/aoemotebutton.h @@ -5,6 +5,7 @@ #include #include #include +#include class AOEmoteButton : public QPushButton { Q_OBJECT @@ -16,16 +17,17 @@ public: void set_image(QString p_image, QString p_emote_comment); void set_char_image(QString p_char, int p_emote, bool on); + void set_selected_image(QString p_image); + void set_id(int p_id) { m_id = p_id; } int get_id() { return m_id; } private: QWidget *parent; AOApplication *ao_app; + QLabel *ui_selected = nullptr; int m_id = 0; - - signals: void emote_clicked(int p_id); -- cgit