GuiSwitch: Do not draw onImg and offImg when not visible (#11)

Co-authored-by: Maschell <Maschell@gmx.de>
This commit is contained in:
GaryOderNichts 2022-02-05 14:50:09 +01:00 committed by GitHub
parent 9c1b9ba442
commit 62e2655b72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,6 +63,10 @@ void GuiSwitch::setImageHighlighted(GuiImage *img) {
}
void GuiSwitch::draw(CVideo *v) {
if (!this->isVisible()) {
return;
}
GuiToggle::draw(v);
if (getValue()) {
if (onImg != NULL) {