mirror of https://github.com/stella-emu/stella.git
adding simpler navigation with directional keys for the Input Settings dialog. Reason: Non stylus (mouse) devices have to bind special keys for changing tabs, which is counter intuitive. I could wrap these changes around a wince define but they don't seem awkward.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1305 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
07a76c1921
commit
73ce5f5595
|
@ -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: InputDialog.cxx,v 1.23 2007-01-17 13:17:42 stephena Exp $
|
||||
// $Id: InputDialog.cxx,v 1.24 2007-01-23 14:57:14 knakos Exp $
|
||||
//============================================================================
|
||||
|
||||
#include "OSystem.hxx"
|
||||
|
@ -39,6 +39,7 @@ InputDialog::InputDialog(OSystem* osystem, DialogContainer* parent,
|
|||
xpos = 2; ypos = vBorder;
|
||||
myTab = new TabWidget(this, font, xpos, ypos, _w - 2*xpos, _h - 24 - 2*ypos);
|
||||
addTabWidget(myTab);
|
||||
wid.push_back(myTab);
|
||||
|
||||
// 1) Event mapper for emulation actions
|
||||
tabID = myTab->addTab("Emul. Events");
|
||||
|
|
|
@ -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: TabWidget.cxx,v 1.25 2007-01-01 18:04:54 stephena Exp $
|
||||
// $Id: TabWidget.cxx,v 1.26 2007-01-23 14:57:14 knakos Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -208,6 +208,26 @@ void TabWidget::handleCommand(CommandSender* sender, int cmd, int data, int id)
|
|||
}
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool TabWidget::handleEvent(Event::Type event)
|
||||
{
|
||||
switch (event)
|
||||
{
|
||||
case Event::UIDown:
|
||||
case Event::UIRight:
|
||||
case Event::UIPgDown:
|
||||
cycleTab(1);
|
||||
return true;
|
||||
|
||||
case Event::UIUp:
|
||||
case Event::UILeft:
|
||||
case Event::UIPgUp:
|
||||
cycleTab(-1);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void TabWidget::loadConfig()
|
||||
{
|
||||
|
|
|
@ -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: TabWidget.hxx,v 1.16 2007-01-01 18:04:54 stephena Exp $
|
||||
// $Id: TabWidget.hxx,v 1.17 2007-01-23 14:57:14 knakos Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -67,6 +67,7 @@ class TabWidget : public Widget, public CommandSender
|
|||
|
||||
virtual void handleMouseDown(int x, int y, int button, int clickCount);
|
||||
virtual void handleCommand(CommandSender* sender, int cmd, int data, int id);
|
||||
virtual bool handleEvent(Event::Type event);
|
||||
|
||||
virtual void loadConfig();
|
||||
|
||||
|
|
Loading…
Reference in New Issue