@@ -68,6 +68,8 @@ static OrderedImageRgbaU8 generateButtonImage(MediaMethod imageGenerator, int pr
void Button::generateGraphics() {
int width = this->location.width();
int height = this->location.height();
+ if (width < 1) { width = 1; }
+ if (height < 1) { height = 1; }
if (!this->hasImages) {
completeAssets();
this->imageUp = generateButtonImage(this->button, 0, width, height, this->color.value, this->text.value, this->font);
@@ -52,6 +52,8 @@ bool Panel::isContainer() const {
void Panel::generateGraphics() {
this->background(width, height, this->color.value.red, this->color.value.green, this->color.value.blue)(this->imageBackground);