From 0be035e47079290141171ca4cfc97b61d736d847 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sun, 11 Jun 2006 21:26:43 +0000 Subject: Re-calculate the label width for EditGameDialog's language and platform pop-ups when the screen changes. svn-id: r23034 --- gui/launcher.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/gui/launcher.cpp b/gui/launcher.cpp index c78f95e306..4995fce5ea 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -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(); -- cgit v1.2.3