spell menu measure spell labels

This commit is contained in:
2024-11-25 20:28:28 -06:00
committed by Celtic Minstrel
parent 0b644e7427
commit c2dc4f2252
2 changed files with 44 additions and 38 deletions

View File

@@ -1756,6 +1756,9 @@ static void put_spell_list(cDialog& me, const eSkill store_situation) {
} else name << (*cSpell::fromNum(store_situation,i)).cost;
name << ")";
me[id].setText(name.str());
rectangle bounds = me[id].getBounds();
bounds.width() = me[id].getPreferredSize().x;
me[id].setBounds(bounds);
if(spell_index[i] == 90)
me[id].show();
}
@@ -1776,6 +1779,9 @@ static void put_spell_list(cDialog& me, const eSkill store_situation) {
} else name << (*cSpell::fromNum(store_situation,spell_index[i])).cost;
name << ")";
me[id].setText(name.str());
rectangle bounds = me[id].getBounds();
bounds.width() = me[id].getPreferredSize().x;
me[id].setBounds(bounds);
}
else me[id].hide();
}