Re-calculate the label width for EditGameDialog's language and platform pop-ups

when the screen changes.

svn-id: r23034
This commit is contained in:
Torbjörn Andersson 2006-06-11 21:26:43 +00:00
parent 4867a75918
commit 0be035e470

View File

@ -117,6 +117,8 @@ class EditGameDialog : public OptionsDialog {
public:
EditGameDialog(const String &domain, const String &desc);
virtual void handleScreenChanged();
void open();
void close();
virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
@ -260,6 +262,17 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc)
new ButtonWidget(this, "gameoptions_ok", "OK", kOKCmd, 0);
}
void EditGameDialog::handleScreenChanged() {
OptionsDialog::handleScreenChanged();
int labelWidth = g_gui.evaluator()->getVar("gameOptionsLabelWidth");
if (_langPopUp)
_langPopUp->changeLabelWidth(labelWidth);
if (_platformPopUp)
_platformPopUp->changeLabelWidth(labelWidth);
}
void EditGameDialog::open() {
OptionsDialog::open();