mirror of https://github.com/stella-emu/stella.git
Added 'Exit Menu' button to the Options Menu. You can still exit by using
the 'Tab' key, though. Fixed Unicode issues whereby modifier keys couldn't be used as gaming keys. Made the 'Left Control' key be one of the defaults for 'Player 1 Fire'. The other two are 'Joystick 0, button 0' and 'Space' key. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@496 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
cdb61cddb0
commit
bf16e9a6f9
|
@ -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.72 2005-06-07 21:22:38 stephena Exp $
|
||||
// $Id: EventHandler.cxx,v 1.73 2005-06-14 12:18:36 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#include <algorithm>
|
||||
|
@ -1067,6 +1067,7 @@ void EventHandler::setDefaultKeymap()
|
|||
myKeyTable[ SDLK_LEFT ] = Event::JoystickZeroLeft;
|
||||
myKeyTable[ SDLK_RIGHT ] = Event::JoystickZeroRight;
|
||||
myKeyTable[ SDLK_SPACE ] = Event::JoystickZeroFire;
|
||||
myKeyTable[ SDLK_LCTRL ] = Event::JoystickZeroFire;
|
||||
myKeyTable[ SDLK_4 ] = Event::BoosterGripZeroTrigger;
|
||||
myKeyTable[ SDLK_5 ] = Event::BoosterGripZeroBooster;
|
||||
|
||||
|
|
|
@ -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: EventMappingDialog.cxx,v 1.12 2005-05-26 15:43:44 stephena Exp $
|
||||
// $Id: EventMappingDialog.cxx,v 1.13 2005-06-14 12:18:37 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -182,7 +182,7 @@ void EventMappingDialog::handleKeyDown(int ascii, int keycode, int modifiers)
|
|||
if(myRemapStatus && myActionSelected >= 0)
|
||||
{
|
||||
Event::Type event = EventHandler::ourActionList[ myActionSelected ].event;
|
||||
instance()->eventHandler().addKeyMapping(event, ascii);
|
||||
instance()->eventHandler().addKeyMapping(event, keycode);
|
||||
|
||||
stopRemapping();
|
||||
}
|
||||
|
|
|
@ -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.18 2005-05-16 15:37:30 stephena Exp $
|
||||
// $Id: OptionsDialog.cxx,v 1.19 2005-06-14 12:18:37 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -40,14 +40,15 @@ enum {
|
|||
kEMapCmd = 'EMAP',
|
||||
kInfoCmd = 'INFO',
|
||||
kHelpCmd = 'HELP',
|
||||
kAboutCmd = 'ABOU'
|
||||
kAboutCmd = 'ABOU',
|
||||
kExitCmd = 'EXIM'
|
||||
};
|
||||
|
||||
enum {
|
||||
kRowHeight = 22,
|
||||
kBigButtonWidth = 90,
|
||||
kMainMenuWidth = (kBigButtonWidth + 2 * 8),
|
||||
kMainMenuHeight = 6 * kRowHeight + 10,
|
||||
kMainMenuHeight = 7 * kRowHeight + 10,
|
||||
};
|
||||
|
||||
#define addBigButton(label, cmd, hotkey) \
|
||||
|
@ -80,6 +81,7 @@ OptionsDialog::OptionsDialog(OSystem* osystem, DialogContainer* parent)
|
|||
addBigButton("Game Information", kInfoCmd, 0);
|
||||
addBigButton("Help", kHelpCmd, 0);
|
||||
addBigButton("About", kAboutCmd, 0);
|
||||
addBigButton("Exit Menu", kExitCmd, 0);
|
||||
|
||||
// Set some sane values for the dialog boxes
|
||||
int fbWidth = osystem->frameBuffer().baseWidth();
|
||||
|
@ -173,6 +175,10 @@ void OptionsDialog::handleCommand(CommandSender* sender, int cmd, int data)
|
|||
parent()->addDialog(myAboutDialog);
|
||||
break;
|
||||
|
||||
case kExitCmd:
|
||||
instance()->eventHandler().leaveMenuMode();
|
||||
break;
|
||||
|
||||
default:
|
||||
Dialog::handleCommand(sender, cmd, data);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue