add text to leds for pc-alchemy-info.xml

This commit is contained in:
2025-01-09 14:15:05 -06:00
committed by Celtic Minstrel
parent 80861d0237
commit e8bcd663c3
2 changed files with 22 additions and 24 deletions

View File

@@ -226,10 +226,11 @@ void display_alchemy(bool allowEdit,cDialog* parent) {
std::string name = get_str("magic-names", i + 200) + " (";
name += std::to_string((*eAlchemy(i)).difficulty);
name += ')';
showAlch->addLabelFor(id, name, LABEL_LEFT, 83, true);
if(!allowEdit)
showAlch->getControl(id).attachClickHandler(&cLed::noAction);
cLed& led = dynamic_cast<cLed&>(showAlch->getControl(id));
led.setText(name);
led.recalcRect();
if(univ.party.alchemy[i])
led.setState(led_red);
else led.setState(led_off);