aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2003-12-01 22:16:29 +0000
committerMax Horn2003-12-01 22:16:29 +0000
commit57efe0438f25e57d58498ab225b6025033218a59 (patch)
treeb182a0798e9e990ac1a8eedc2ade3de2abe80b40
parente04d8576cbd698fc24ac3e5761c9f454f72112ca (diff)
downloadscummvm-rg350-57efe0438f25e57d58498ab225b6025033218a59.tar.gz
scummvm-rg350-57efe0438f25e57d58498ab225b6025033218a59.tar.bz2
scummvm-rg350-57efe0438f25e57d58498ab225b6025033218a59.zip
don't do a global import of namespace GUI
svn-id: r11451
-rw-r--r--scumm/dialogs.cpp24
1 files changed, 15 insertions, 9 deletions
diff --git a/scumm/dialogs.cpp b/scumm/dialogs.cpp
index a121fcbaf3..a62714bfd3 100644
--- a/scumm/dialogs.cpp
+++ b/scumm/dialogs.cpp
@@ -47,7 +47,13 @@ extern void save_key_mapping();
extern void load_key_mapping();
#endif
-using namespace GUI;
+using GUI::CommandSender;
+using GUI::StaticTextWidget;
+using GUI::kButtonWidth;
+using GUI::kCloseCmd;
+using GUI::kTextAlignCenter;
+using GUI::kTextAlignLeft;
+using GUI::WIDGET_ENABLED;
namespace Scumm {
@@ -191,7 +197,7 @@ enum {
kQuitCmd = 'QUIT'
};
-class SaveLoadChooser : public ChooserDialog {
+class SaveLoadChooser : public GUI::ChooserDialog {
typedef Common::String String;
typedef Common::StringList StringList;
protected:
@@ -208,7 +214,7 @@ SaveLoadChooser::SaveLoadChooser(const String &title, const String &buttonLabel,
: ChooserDialog(title, buttonLabel, 182), _saveMode(saveMode) {
_list->setEditable(saveMode);
- _list->setNumberingMode(saveMode ? kListNumberingOne : kListNumberingZero);
+ _list->setNumberingMode(saveMode ? GUI::kListNumberingOne : GUI::kListNumberingZero);
}
const Common::String &SaveLoadChooser::getResultString() const {
@@ -218,8 +224,8 @@ const Common::String &SaveLoadChooser::getResultString() const {
void SaveLoadChooser::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
int selItem = _list->getSelected();
switch (cmd) {
- case kListItemActivatedCmd:
- case kListItemDoubleClickedCmd:
+ case GUI::kListItemActivatedCmd:
+ case GUI::kListItemDoubleClickedCmd:
if (selItem >= 0) {
if (_saveMode || !getResultString().isEmpty()) {
setResult(selItem);
@@ -227,7 +233,7 @@ void SaveLoadChooser::handleCommand(CommandSender *sender, uint32 cmd, uint32 da
}
}
break;
- case kListSelectionChangedCmd:
+ case GUI::kListSelectionChangedCmd:
if (_saveMode) {
_list->startEditMode();
}
@@ -273,7 +279,7 @@ enum {
};
#define addBigButton(label, cmd, hotkey) \
- new ButtonWidget(this, x, y, kBigButtonWidth, 16, label, cmd, hotkey); y += kRowHeight
+ new GUI::ButtonWidget(this, x, y, kBigButtonWidth, 16, label, cmd, hotkey); y += kRowHeight
MainMenuDialog::MainMenuDialog(ScummEngine *scumm)
: ScummDialog(scumm, (320 - kMainMenuWidth) / 2, (200 - kMainMenuHeight)/2, kMainMenuWidth, kMainMenuHeight) {
@@ -299,7 +305,7 @@ MainMenuDialog::MainMenuDialog(ScummEngine *scumm)
//
// Create the sub dialog(s)
//
- _aboutDialog = new AboutDialog();
+ _aboutDialog = new GUI::AboutDialog();
#ifndef DISABLE_HELP
_helpDialog = new HelpDialog(scumm);
#endif
@@ -431,7 +437,7 @@ OptionsDialog::OptionsDialog(ScummEngine *scumm)
//
// Some misc options
//
- subtitlesCheckbox = new CheckboxWidget(this, 15, 62, 200, 16, "Show subtitles", 0, 'S');
+ subtitlesCheckbox = new GUI::CheckboxWidget(this, 15, 62, 200, 16, "Show subtitles", 0, 'S');
//
// Create the sub dialog(s)