diff options
author | Max Horn | 2002-07-12 16:24:11 +0000 |
---|---|---|
committer | Max Horn | 2002-07-12 16:24:11 +0000 |
commit | e34571dca90689bd7367697c842927994a38d62d (patch) | |
tree | 017bb4761fc65a9b517c2f08a45d17a20bd6a813 /gui/dialog.cpp | |
parent | c99d9a57c0e6d3d24c3f6c51c50612a228f17158 (diff) | |
download | scummvm-rg350-e34571dca90689bd7367697c842927994a38d62d.tar.gz scummvm-rg350-e34571dca90689bd7367697c842927994a38d62d.tar.bz2 scummvm-rg350-e34571dca90689bd7367697c842927994a38d62d.zip |
Countless changes to the New GUI; some hightligths: new ScrollBarWidget class; ListWidget is usable (demo shows it off); added custom String/StringList classes
svn-id: r4521
Diffstat (limited to 'gui/dialog.cpp')
-rw-r--r-- | gui/dialog.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gui/dialog.cpp b/gui/dialog.cpp index c14f4e769e..9833058df7 100644 --- a/gui/dialog.cpp +++ b/gui/dialog.cpp @@ -84,7 +84,7 @@ void Dialog::handleClick(int x, int y, int button) { Widget *w = findWidget(x - _x, y - _y); if (w) - w->handleClick(button); + w->handleClick(x - _x - w->_x, y - _y - w->_y, button); } void Dialog::handleKey(char key, int modifiers) @@ -98,7 +98,7 @@ void Dialog::handleKey(char key, int modifiers) key = toupper(key); while (w) { if (w->_type == kButtonWidget && key == toupper(((ButtonWidget *)w)->_hotkey)) { - w->handleClick(1); + w->handleClick(0, 0, 1); break; } w = w->_next; @@ -130,7 +130,7 @@ void Dialog::handleMouseMoved(int x, int y, int button) } -void Dialog::handleCommand(uint32 cmd) +void Dialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { switch (cmd) { case kCloseCmd: @@ -205,10 +205,10 @@ SaveLoadDialog::SaveLoadDialog(NewGui *gui) new SliderWidget(this, 110, 20, 80, 16, "Volume", 0); // FIXME - test - new ListWidget(this, 10, 40, 180, 70); + new ListWidget(this, 10, 40, 180, 74); } -void SaveLoadDialog::handleCommand(uint32 cmd) +void SaveLoadDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { switch (cmd) { case kSaveCmd: @@ -225,7 +225,7 @@ void SaveLoadDialog::handleCommand(uint32 cmd) exit(1); break; default: - Dialog::handleCommand(cmd); + Dialog::handleCommand(sender, cmd, data); } } @@ -249,7 +249,7 @@ OptionsDialog::OptionsDialog(NewGui *gui) addButton(150, 35, 40, 15, CUSTOM_STRING(23), kCloseCmd, 'C'); // Close dialog - FIXME } -void OptionsDialog::handleCommand(uint32 cmd) +void OptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { switch (cmd) { case kSoundCmd: @@ -262,7 +262,7 @@ void OptionsDialog::handleCommand(uint32 cmd) case kMiscCmd: break; default: - Dialog::handleCommand(cmd); + Dialog::handleCommand(sender, cmd, data); } } |