still require width on other button types

This commit is contained in:
2024-11-25 18:51:12 -06:00
committed by Celtic Minstrel
parent 9fb5cdbefd
commit f47229417b

View File

@@ -177,6 +177,8 @@ void cButton::validatePostParse(ticpp::Element& elem, std::string fname, const s
if(labelledButtons.count(type)) {
if(!attrs.count("color") && !attrs.count("colour") && parent->getBg() == cDialog::BG_DARK)
setColour(sf::Color::White);
if(type != BTN_TINY && type != BTN_LED && !getText().empty() && !attrs.count("width"))
throw xMissingAttr(elem.Value(), "width", elem.Row(), elem.Column(), fname);
}
}