Allow button generator to generate both on and off buttons (#320)

We'll see how cursed this is.
This commit is contained in:
in1tiate 2021-01-11 12:01:09 -06:00 committed by GitHub
parent d54d1c1b72
commit 967f17a53f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;