diff options
author | Max Horn | 2003-11-28 21:56:14 +0000 |
---|---|---|
committer | Max Horn | 2003-11-28 21:56:14 +0000 |
commit | 54aa33310d1dbd9f04e2ede970d8e17200798000 (patch) | |
tree | f0759afc13ec3d4d569fe2c2272dd748a665b843 /gui/chooser.cpp | |
parent | 8a6b0e2e1837711d06e0ed66913f340d8d923bb3 (diff) | |
download | scummvm-rg350-54aa33310d1dbd9f04e2ede970d8e17200798000.tar.gz scummvm-rg350-54aa33310d1dbd9f04e2ede970d8e17200798000.tar.bz2 scummvm-rg350-54aa33310d1dbd9f04e2ede970d8e17200798000.zip |
reuse SaveLoadChooser in main dialog -> this means the SaveLoadChooser remembers the scroll position -> improved user experience
svn-id: r11415
Diffstat (limited to 'gui/chooser.cpp')
-rw-r--r-- | gui/chooser.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gui/chooser.cpp b/gui/chooser.cpp index 78d270269e..ad32c4f6ad 100644 --- a/gui/chooser.cpp +++ b/gui/chooser.cpp @@ -29,7 +29,7 @@ enum { kChooseCmd = 'Chos' }; -ChooserDialog::ChooserDialog(const String &title, const StringList& list, const String &buttonLabel, int height) +ChooserDialog::ChooserDialog(const String &title, const String &buttonLabel, int height) : Dialog(8, (200 - height) / 2, 320 - 2 * 8, height) { // Headline new StaticTextWidget(this, 10, 6, _w - 2 * 10, kLineHeight, title, kTextAlignCenter); @@ -37,7 +37,6 @@ ChooserDialog::ChooserDialog(const String &title, const StringList& list, const // Add choice list _list = new ListWidget(this, 10, 18, _w - 2 * 10, _h - 14 - 24 - 10); _list->setNumberingMode(kListNumberingOff); - _list->setList(list); // Buttons addButton(_w - 2 * (kButtonWidth + 10), _h - 24, "Cancel", kCloseCmd, 0); @@ -45,6 +44,10 @@ ChooserDialog::ChooserDialog(const String &title, const StringList& list, const _chooseButton->setEnabled(false); } +void ChooserDialog::setList(const StringList& list) { + _list->setList(list); +} + void ChooserDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { int item = _list->getSelected(); switch (cmd) { |