From cc5afaba1194ff427d6c4bb4af2b34d9964ecfeb Mon Sep 17 00:00:00 2001 From: stephena Date: Tue, 28 Nov 2006 21:48:56 +0000 Subject: [PATCH] Added 'UIOK' and 'UICancel' menu events to the core, and made them remappable in the InputDialog. These are a shortcut for the OK and Cancel buttons in certain Dialog boxes, instead of having to tab to the respective buttons. By default, 'UICancel' is mapped to Escape, and 'UIOK' is not mapped to anything. Hopefully fixed the issue with the GP2X window not being cleared when switching between emulation modes. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1160 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- stella/src/common/FrameBufferSoft.cxx | 3 ++- stella/src/emucore/Event.hxx | 6 +++--- stella/src/emucore/EventHandler.cxx | 7 ++++--- stella/src/emucore/EventHandler.hxx | 6 +++--- stella/src/gp2x/OSystemGP2X.cxx | 3 +-- stella/src/gui/AboutDialog.cxx | 3 ++- stella/src/gui/AudioDialog.cxx | 6 +++++- stella/src/gui/BrowserDialog.cxx | 6 +++++- stella/src/gui/Dialog.cxx | 22 +++++++++++++++++++++- stella/src/gui/Dialog.hxx | 8 ++++++-- stella/src/gui/GameInfoDialog.cxx | 6 +++++- stella/src/gui/HelpDialog.cxx | 3 ++- stella/src/gui/InputTextDialog.cxx | 6 +++++- stella/src/gui/LauncherDialog.cxx | 10 +++++++++- stella/src/gui/LauncherOptionsDialog.cxx | 6 +++++- stella/src/gui/OptionsDialog.cxx | 3 ++- stella/src/gui/VideoDialog.cxx | 6 +++++- 17 files changed, 85 insertions(+), 25 deletions(-) diff --git a/stella/src/common/FrameBufferSoft.cxx b/stella/src/common/FrameBufferSoft.cxx index 6c9faabdf..7eb5527b0 100644 --- a/stella/src/common/FrameBufferSoft.cxx +++ b/stella/src/common/FrameBufferSoft.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: FrameBufferSoft.cxx,v 1.57 2006-11-04 19:38:24 stephena Exp $ +// $Id: FrameBufferSoft.cxx,v 1.58 2006-11-28 21:48:55 stephena Exp $ //============================================================================ #include @@ -44,6 +44,7 @@ FrameBufferSoft::~FrameBufferSoft() { delete myRectList; delete myOverlayRectList; + cls(); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/stella/src/emucore/Event.hxx b/stella/src/emucore/Event.hxx index ec3b3ee68..03d2b1efe 100644 --- a/stella/src/emucore/Event.hxx +++ b/stella/src/emucore/Event.hxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: Event.hxx,v 1.21 2006-05-15 12:24:09 stephena Exp $ +// $Id: Event.hxx,v 1.22 2006-11-28 21:48:56 stephena Exp $ //============================================================================ #ifndef EVENT_HXX @@ -26,7 +26,7 @@ class EventStreamer; /** @author Bradford W. Mott - @version $Id: Event.hxx,v 1.21 2006-05-15 12:24:09 stephena Exp $ + @version $Id: Event.hxx,v 1.22 2006-11-28 21:48:56 stephena Exp $ */ class Event { @@ -81,7 +81,7 @@ class Event VolumeDecrease, VolumeIncrease, UIUp, UIDown, UILeft, UIRight, UIHome, UIEnd, UIPgUp, UIPgDown, - UISelect, UIPrevDir, UINavPrev, UINavNext, UITabPrev, UITabNext, + UISelect, UINavPrev, UINavNext, UITabPrev, UITabNext, UIOK, UICancel, LastType }; diff --git a/stella/src/emucore/EventHandler.cxx b/stella/src/emucore/EventHandler.cxx index 7784eb297..b410a4968 100644 --- a/stella/src/emucore/EventHandler.cxx +++ b/stella/src/emucore/EventHandler.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: EventHandler.cxx,v 1.173 2006-11-27 22:57:09 stephena Exp $ +// $Id: EventHandler.cxx,v 1.174 2006-11-28 21:48:56 stephena Exp $ //============================================================================ #include @@ -1772,7 +1772,7 @@ void EventHandler::setDefaultKeymap(EventMode mode) myKeyTable[ SDLK_PAGEDOWN ][mode] = Event::UIPgDown; myKeyTable[ SDLK_RETURN ][mode] = Event::UISelect; - myKeyTable[ SDLK_BACKSPACE ][mode] = Event::UIPrevDir; + myKeyTable[ SDLK_ESCAPE ][mode] = Event::UICancel; break; default: @@ -2671,8 +2671,9 @@ ActionList EventHandler::ourMenuActionList[kMenuActionListSize] = { { Event::UIPgUp, "Page Up", 0 }, { Event::UIPgDown, "Page Down", 0 }, + { Event::UIOK, "OK", 0 }, + { Event::UICancel, "Cancel", 0 }, { Event::UISelect, "Select item", 0 }, - { Event::UIPrevDir, "Previous Directory", 0 }, { Event::UINavPrev, "Previous object", 0 }, { Event::UINavNext, "Next object", 0 }, diff --git a/stella/src/emucore/EventHandler.hxx b/stella/src/emucore/EventHandler.hxx index d74b21a2f..887b6d71c 100644 --- a/stella/src/emucore/EventHandler.hxx +++ b/stella/src/emucore/EventHandler.hxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: EventHandler.hxx,v 1.90 2006-11-06 00:52:03 stephena Exp $ +// $Id: EventHandler.hxx,v 1.91 2006-11-28 21:48:56 stephena Exp $ //============================================================================ #ifndef EVENTHANDLER_HXX @@ -62,7 +62,7 @@ struct ActionList { enum { kEmulActionListSize = 81, - kMenuActionListSize = 14 + kMenuActionListSize = 15 }; enum EventMode { @@ -114,7 +114,7 @@ struct JoyMouse { mapping can take place. @author Stephen Anthony - @version $Id: EventHandler.hxx,v 1.90 2006-11-06 00:52:03 stephena Exp $ + @version $Id: EventHandler.hxx,v 1.91 2006-11-28 21:48:56 stephena Exp $ */ class EventHandler { diff --git a/stella/src/gp2x/OSystemGP2X.cxx b/stella/src/gp2x/OSystemGP2X.cxx index 1ee35674a..6d2df4e23 100644 --- a/stella/src/gp2x/OSystemGP2X.cxx +++ b/stella/src/gp2x/OSystemGP2X.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: OSystemGP2X.cxx,v 1.11 2006-11-13 00:21:41 stephena Exp $ +// $Id: OSystemGP2X.cxx,v 1.12 2006-11-28 21:48:56 stephena Exp $ // Modified on 2006/01/06 by Alex Zaballa for use on GP2X //============================================================================ @@ -153,7 +153,6 @@ void OSystemGP2X::setDefaultJoymap() myEventHandler->setDefaultJoyMapping(Event::UIPgDown, kMenuMode, 0, 11); // R myEventHandler->setDefaultJoyMapping(Event::UITabNext, kMenuMode, 0, 12); // A myEventHandler->setDefaultJoyMapping(Event::UISelect, kMenuMode, 0, 13); // B - myEventHandler->setDefaultJoyMapping(Event::UIPrevDir, kMenuMode, 0, 14); // X myEventHandler->setDefaultJoyMapping(Event::UINavNext, kMenuMode, 0, 15); // Y myEventHandler->setDefaultJoyMapping(Event::NoType, kMenuMode, 0, 16); // Vol+ myEventHandler->setDefaultJoyMapping(Event::NoType, kMenuMode, 0, 17); // Vol- diff --git a/stella/src/gui/AboutDialog.cxx b/stella/src/gui/AboutDialog.cxx index 64dbdc530..50399d1d2 100644 --- a/stella/src/gui/AboutDialog.cxx +++ b/stella/src/gui/AboutDialog.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: AboutDialog.cxx,v 1.13 2006-05-04 17:45:25 stephena Exp $ +// $Id: AboutDialog.cxx,v 1.14 2006-11-28 21:48:56 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -50,6 +50,7 @@ AboutDialog::AboutDialog(OSystem* osystem, DialogContainer* parent, ButtonWidget* b = addButton(font, w - (kButtonWidth + 10), h - 24, "Close", kCloseCmd); wid.push_back(b); + addCancelWidget(b); myTitle = new StaticTextWidget(this, font, 5, 5, w - 10, font.getFontHeight(), "", kTextAlignCenter); diff --git a/stella/src/gui/AudioDialog.cxx b/stella/src/gui/AudioDialog.cxx index 718255974..d3b874f01 100644 --- a/stella/src/gui/AudioDialog.cxx +++ b/stella/src/gui/AudioDialog.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: AudioDialog.cxx,v 1.20 2006-11-03 16:50:18 stephena Exp $ +// $Id: AudioDialog.cxx,v 1.21 2006-11-28 21:48:56 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -122,13 +122,17 @@ AudioDialog::AudioDialog(OSystem* osystem, DialogContainer* parent, #ifndef MAC_OSX b = addButton(font, _w - 2 * (kButtonWidth + 7), _h - 24, "OK", kOKCmd); wid.push_back(b); + addOKWidget(b); b = addButton(font, _w - (kButtonWidth + 10), _h - 24, "Cancel", kCloseCmd); wid.push_back(b); + addCancelWidget(b); #else b = addButton(font, _w - 2 * (kButtonWidth + 7), _h - 24, "Cancel", kCloseCmd); wid.push_back(b); + addCancelWidget(b); b = addButton(font, _w - (kButtonWidth + 10), _h - 24, "OK", kOKCmd); wid.push_back(b); + addOKWidget(b); #endif addToFocusList(wid); diff --git a/stella/src/gui/BrowserDialog.cxx b/stella/src/gui/BrowserDialog.cxx index f82375b42..4b83d96d4 100644 --- a/stella/src/gui/BrowserDialog.cxx +++ b/stella/src/gui/BrowserDialog.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: BrowserDialog.cxx,v 1.19 2006-05-04 17:45:25 stephena Exp $ +// $Id: BrowserDialog.cxx,v 1.20 2006-11-28 21:48:56 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -79,19 +79,23 @@ BrowserDialog::BrowserDialog(GuiObject* boss, const GUI::Font& font, b = new ButtonWidget(this, font, xpos, ypos, bwidth, bheight, "Choose", kChooseCmd); addFocusWidget(b); + addOKWidget(b); xpos += bwidth + 10; b = new ButtonWidget(this, font, xpos, ypos, bwidth, bheight, "Cancel", kCloseCmd); addFocusWidget(b); + addCancelWidget(b); #else xpos = _w - 2 *(bwidth + 10); ypos = _h - bheight - 8; b = new ButtonWidget(this, font, xpos, ypos, bwidth, bheight, "Cancel", kCloseCmd); addFocusWidget(b); + addCancelWidget(b); xpos += bwidth + 10; b = new ButtonWidget(this, font, xpos, ypos, bwidth, bheight, "Choose", kChooseCmd); addFocusWidget(b); + addOKWidget(b); #endif addFocusWidget(_fileList); diff --git a/stella/src/gui/Dialog.cxx b/stella/src/gui/Dialog.cxx index f370c68a1..c90af7061 100644 --- a/stella/src/gui/Dialog.cxx +++ b/stella/src/gui/Dialog.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: Dialog.cxx,v 1.47 2006-05-25 19:03:57 stephena Exp $ +// $Id: Dialog.cxx,v 1.48 2006-11-28 21:48:56 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -43,6 +43,8 @@ Dialog::Dialog(OSystem* instance, DialogContainer* parent, _mouseWidget(0), _focusedWidget(0), _dragWidget(0), + _okWidget(0), + _cancelWidget(0), _visible(true), _ourTab(NULL), _focusID(0) @@ -482,6 +484,24 @@ bool Dialog::handleNavEvent(Event::Type e) } break; + case Event::UIOK: + if(_okWidget) + { + // Receiving 'OK' is the same as getting the 'Select' event + _okWidget->handleEvent(Event::UISelect); + return true; + } + break; + + case Event::UICancel: + if(_cancelWidget) + { + // Receiving 'Cancel' is the same as getting the 'Select' event + _cancelWidget->handleEvent(Event::UISelect); + return true; + } + break; + default: return false; break; diff --git a/stella/src/gui/Dialog.hxx b/stella/src/gui/Dialog.hxx index c33998351..48bb8cc31 100644 --- a/stella/src/gui/Dialog.hxx +++ b/stella/src/gui/Dialog.hxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: Dialog.hxx,v 1.30 2006-05-15 16:21:27 stephena Exp $ +// $Id: Dialog.hxx,v 1.31 2006-11-28 21:48:56 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -36,7 +36,7 @@ class TabWidget; This is the base class for all dialog boxes. @author Stephen Anthony - @version $Id: Dialog.hxx,v 1.30 2006-05-15 16:21:27 stephena Exp $ + @version $Id: Dialog.hxx,v 1.31 2006-11-28 21:48:56 stephena Exp $ */ class Dialog : public GuiObject { @@ -67,6 +67,8 @@ class Dialog : public GuiObject void addToFocusList(WidgetArray& list, int id = -1); void redrawFocus(); void addTabWidget(TabWidget* w) { _ourTab = w; } + void addOKWidget(Widget* w) { _okWidget = w; } + void addCancelWidget(Widget* w) { _cancelWidget = w; } void setFocus(Widget* w); protected: @@ -102,6 +104,8 @@ class Dialog : public GuiObject Widget* _mouseWidget; Widget* _focusedWidget; Widget* _dragWidget; + Widget* _okWidget; + Widget* _cancelWidget; bool _visible; private: diff --git a/stella/src/gui/GameInfoDialog.cxx b/stella/src/gui/GameInfoDialog.cxx index 23e045ee8..16bbd3040 100644 --- a/stella/src/gui/GameInfoDialog.cxx +++ b/stella/src/gui/GameInfoDialog.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: GameInfoDialog.cxx,v 1.27 2006-11-19 20:59:30 stephena Exp $ +// $Id: GameInfoDialog.cxx,v 1.28 2006-11-28 21:48:56 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -288,13 +288,17 @@ GameInfoDialog::GameInfoDialog( #ifndef MAC_OSX b = addButton(font, _w - 2 * (kButtonWidth + 7), _h - 24, "OK", kOKCmd); wid.push_back(b); + addOKWidget(b); b = addButton(font, _w - (kButtonWidth + 10), _h - 24, "Cancel", kCloseCmd); wid.push_back(b); + addCancelWidget(b); #else b = addButton(font, _w - 2 * (kButtonWidth + 7), _h - 24, "Cancel", kCloseCmd); wid.push_back(b); + addCancelWidget(b); b = addButton(font, _w - (kButtonWidth + 10), _h - 24, "OK", kOKCmd); wid.push_back(b); + addOKWidget(b); #endif addToFocusList(wid); } diff --git a/stella/src/gui/HelpDialog.cxx b/stella/src/gui/HelpDialog.cxx index 7e5b410eb..bd1ad0e14 100644 --- a/stella/src/gui/HelpDialog.cxx +++ b/stella/src/gui/HelpDialog.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: HelpDialog.cxx,v 1.16 2006-05-04 17:45:25 stephena Exp $ +// $Id: HelpDialog.cxx,v 1.17 2006-11-28 21:48:56 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -48,6 +48,7 @@ HelpDialog::HelpDialog(OSystem* osystem, DialogContainer* parent, ButtonWidget* b = addButton(font, w - (kButtonWidth + 10), h - 24, "Close", kCloseCmd); wid.push_back(b); + addCancelWidget(b); myTitle = new StaticTextWidget(this, font, 5, 5, w - 10, font.getFontHeight(), "", kTextAlignCenter); diff --git a/stella/src/gui/InputTextDialog.cxx b/stella/src/gui/InputTextDialog.cxx index 0f8d1b460..9e2f51c30 100644 --- a/stella/src/gui/InputTextDialog.cxx +++ b/stella/src/gui/InputTextDialog.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: InputTextDialog.cxx,v 1.13 2006-05-04 17:45:25 stephena Exp $ +// $Id: InputTextDialog.cxx,v 1.14 2006-11-28 21:48:56 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -87,16 +87,20 @@ InputTextDialog::InputTextDialog(GuiObject* boss, const GUI::Font& font, b = new ButtonWidget(this, font, _w - 2 * (bwidth + 10), _h - bheight - 10, bwidth, bheight, "OK", kAcceptCmd); wid.push_back(b); + addOKWidget(b); b = new ButtonWidget(this, font, _w - (bwidth + 10), _h - bheight - 10, bwidth, bheight, "Cancel", kCloseCmd); wid.push_back(b); + addCancelWidget(b); #else b = new ButtonWidget(this, font, _w - 2 * (bwidth + 10), _h - bheight - 10, bwidth, bheight, "Cancel", kCloseCmd); wid.push_back(b); + addCancelWidget(b); b = new ButtonWidget(this, font, _w - (bwidth + 10), _h - bheight - 10, bwidth, bheight, "OK", kAcceptCmd); wid.push_back(b); + addOKWidget(b); #endif addToFocusList(wid); diff --git a/stella/src/gui/LauncherDialog.cxx b/stella/src/gui/LauncherDialog.cxx index 26e534165..6e60171c5 100644 --- a/stella/src/gui/LauncherDialog.cxx +++ b/stella/src/gui/LauncherDialog.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: LauncherDialog.cxx,v 1.56 2006-11-27 14:52:51 stephena Exp $ +// $Id: LauncherDialog.cxx,v 1.57 2006-11-28 21:48:56 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -280,6 +280,14 @@ void LauncherDialog::loadDirListing() { FSList files = myCurrentNode.listDir(FilesystemNode::kListAll); + // Add '[..]' to indicate previous folder + if(myCurrentNode.hasParent()) + { + const string& parent = myCurrentNode.getParent().path(); + myGameList->appendGame(" [..]", parent, "", true); + } + + // Now add the directory entries for(unsigned int idx = 0; idx < files.size(); idx++) { string name = files[idx].displayName(); diff --git a/stella/src/gui/LauncherOptionsDialog.cxx b/stella/src/gui/LauncherOptionsDialog.cxx index d1a651098..90f15af6a 100644 --- a/stella/src/gui/LauncherOptionsDialog.cxx +++ b/stella/src/gui/LauncherOptionsDialog.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: LauncherOptionsDialog.cxx,v 1.18 2006-11-13 00:21:41 stephena Exp $ +// $Id: LauncherOptionsDialog.cxx,v 1.19 2006-11-28 21:48:56 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -115,16 +115,20 @@ LauncherOptionsDialog::LauncherOptionsDialog( xpos = _w - 2 *(bwidth + 10); ypos = _h - bheight - 8; b = new ButtonWidget(this, font, xpos, ypos, bwidth, bheight, "OK", kOKCmd); wid.push_back(b); + addOKWidget(b); xpos += bwidth + 10; b = new ButtonWidget(this, font, xpos, ypos, bwidth, bheight, "Cancel", kCloseCmd); wid.push_back(b); + addCancelWidget(b); #else xpos = _w - 2 *(bwidth + 10); ypos = _h - bheight - 8; b = new ButtonWidget(this, font, xpos, ypos, bwidth, bheight, "Cancel", kCloseCmd); wid.push_back(b); + addCancelWidget(b); xpos += bwidth + 10; b = new ButtonWidget(this, font, xpos, ypos, bwidth, bheight, "OK", kOKCmd); wid.push_back(b); + addOKWidget(b); #endif // Add focus widgets for OK/Cancel buttons addToFocusList(wid); diff --git a/stella/src/gui/OptionsDialog.cxx b/stella/src/gui/OptionsDialog.cxx index f0deb3db1..7d7937af0 100644 --- a/stella/src/gui/OptionsDialog.cxx +++ b/stella/src/gui/OptionsDialog.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: OptionsDialog.cxx,v 1.42 2006-11-18 13:29:11 stephena Exp $ +// $Id: OptionsDialog.cxx,v 1.43 2006-11-28 21:48:56 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -111,6 +111,7 @@ OptionsDialog::OptionsDialog(OSystem* osystem, DialogContainer* parent) b = addBigButton("Exit Menu", kExitCmd); wid.push_back(b); + addCancelWidget(b); // Set some sane values for the dialog boxes int x, y, w, h; diff --git a/stella/src/gui/VideoDialog.cxx b/stella/src/gui/VideoDialog.cxx index 6e633183a..7314734bf 100644 --- a/stella/src/gui/VideoDialog.cxx +++ b/stella/src/gui/VideoDialog.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: VideoDialog.cxx,v 1.33 2006-11-25 01:34:35 stephena Exp $ +// $Id: VideoDialog.cxx,v 1.34 2006-11-28 21:48:56 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -157,13 +157,17 @@ VideoDialog::VideoDialog(OSystem* osystem, DialogContainer* parent, #ifndef MAC_OSX b = addButton(font, _w - 2 * (kButtonWidth + 7), _h - 24, "OK", kOKCmd); wid.push_back(b); + addOKWidget(b); b = addButton(font, _w - (kButtonWidth + 10), _h - 24, "Cancel", kCloseCmd); wid.push_back(b); + addCancelWidget(b); #else b = addButton(font, _w - 2 * (kButtonWidth + 7), _h - 24, "Cancel", kCloseCmd); wid.push_back(b); + addCancelWidget(b); b = addButton(font, _w - (kButtonWidth + 10), _h - 24, "OK", kOKCmd); wid.push_back(b); + addOKWidget(b); #endif addToFocusList(wid);