aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCrystalwarrior <Varsash@Gmail.com>2022-07-07 13:59:34 +0300
committerGitHub <noreply@github.com>2022-07-07 13:59:34 +0300
commitd45834561211bae5525135294f2f5e732ba80854 (patch)
treee183537c26bda66fa3690509a64204305e46cad5 /include
parent7805e80e8337d538b671a35cf15335fbcc54d3e5 (diff)
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
Diffstat (limited to 'include')
-rw-r--r--include/aoemotebutton.h6
1 files changed, 4 insertions, 2 deletions
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 <QPainter>
#include <QDebug>
#include <QPushButton>
+#include <QLabel>
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);