diff options
| author | in1tiate <32779090+in1tiate@users.noreply.github.com> | 2021-01-11 12:01:09 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-11 12:01:09 -0600 |
| commit | 967f17a53f13e0542db9699baef7936eb955fea7 (patch) | |
| tree | ee5ce2cad236243c43f8719c96d8342ee3afa5af /src/aoemotebutton.cpp | |
| parent | d54d1c1b729d86953903f25e8b0d7c2104c7c3f5 (diff) | |
Allow button generator to generate both on and off buttons (#320)
We'll see how cursed this is.
Diffstat (limited to 'src/aoemotebutton.cpp')
| -rw-r--r-- | src/aoemotebutton.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/aoemotebutton.cpp b/src/aoemotebutton.cpp index 652010d2..07e6a42c 100644 --- a/src/aoemotebutton.cpp +++ b/src/aoemotebutton.cpp @@ -25,7 +25,10 @@ void AOEmoteButton::set_image(QString p_image, QString p_emote_comment) "\") 0 0 0 0 stretch stretch; }" "QToolTip { color: #000000; background-color: #ffffff; border: 0px; }"); } - else if (p_image.contains("_on") && file_exists(tmp_p_image.replace("_on", "_off"))) { + else if ((p_image.contains("_on") && + file_exists(tmp_p_image.replace("_on", "_off"))) || + (p_image.contains("_off") && + file_exists(tmp_p_image.replace("_off", "_on")))) { QImage tmpImage(tmp_p_image); tmpImage = tmpImage.convertToFormat(QImage::Format_ARGB32); QPoint p1, p2; |
