diff options
| author | Max Horn | 2002-07-07 21:46:53 +0000 |
|---|---|---|
| committer | Max Horn | 2002-07-07 21:46:53 +0000 |
| commit | 2b50e2a7c0d6ed250a4b58fa0fa1bf18c458d091 (patch) | |
| tree | 21d2206732b1c818858a160a23d3dee8ae8762fd /gui/dialog.cpp | |
| parent | aec25305294920da84a7d0721a2fd4e7f2547c74 (diff) | |
| download | scummvm-rg350-2b50e2a7c0d6ed250a4b58fa0fa1bf18c458d091.tar.gz scummvm-rg350-2b50e2a7c0d6ed250a4b58fa0fa1bf18c458d091.tar.bz2 scummvm-rg350-2b50e2a7c0d6ed250a4b58fa0fa1bf18c458d091.zip | |
added dialog nesting code (for now using std::stack, I will provide my own stack class later
svn-id: r4483
Diffstat (limited to 'gui/dialog.cpp')
| -rw-r--r-- | gui/dialog.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/gui/dialog.cpp b/gui/dialog.cpp index 4523e473cd..36694ab8ff 100644 --- a/gui/dialog.cpp +++ b/gui/dialog.cpp @@ -74,11 +74,7 @@ Widget *Dialog::findWidget(int x, int y) void Dialog::close() { - // FIXME - this code should be inside the Gui class, and should be - // extended to support nested dialogs. - _gui->restoreState(); - _gui->_active = false; - _gui->_activeDialog = 0; + _gui->closeTopDialog(); } void Dialog::addResText(int x, int y, int w, int h, int resID) @@ -116,7 +112,7 @@ enum { }; SaveLoadDialog::SaveLoadDialog(NewGui *gui) -:Dialog (gui, 30, 20, 260, 124) + : Dialog (gui, 30, 20, 260, 124) { addResText(10, 7, 240, 16, 1); // addResText(10, 7, 240, 16, 2); @@ -135,6 +131,8 @@ void SaveLoadDialog::handleCommand(uint32 cmd) case kSaveCmd: break; case kLoadCmd: + // FIXME HACK - just to demo the nesting ability + _gui->pauseDialog(); break; case kPlayCmd: close(); @@ -152,7 +150,7 @@ void SaveLoadDialog::handleCommand(uint32 cmd) PauseDialog::PauseDialog(NewGui *gui) -:Dialog (gui, 50, 80, 220, 16) + : Dialog (gui, 50, 80, 220, 16) { addResText(2, 2, 220, 16, 10); } |
