Finalized the new 'tabwidget is an object' functionality by removing the

UITabPrev/UITabNext events.  This can now be done in the previously
mentioned functionality, freeing up two extra buttons on input-limited
devices.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1308 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2007-01-24 21:36:38 +00:00
parent 903ce3e1ec
commit afcaca1c60
5 changed files with 22 additions and 34 deletions

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of // See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
// //
// $Id: Event.hxx,v 1.26 2007-01-23 09:30:22 knakos Exp $ // $Id: Event.hxx,v 1.27 2007-01-24 21:36:38 stephena Exp $
//============================================================================ //============================================================================
#ifndef EVENT_HXX #ifndef EVENT_HXX
@ -26,7 +26,7 @@ class EventStreamer;
/** /**
@author Bradford W. Mott @author Bradford W. Mott
@version $Id: Event.hxx,v 1.26 2007-01-23 09:30:22 knakos Exp $ @version $Id: Event.hxx,v 1.27 2007-01-24 21:36:38 stephena Exp $
*/ */
class Event class Event
{ {
@ -81,7 +81,7 @@ class Event
VolumeDecrease, VolumeIncrease, VolumeDecrease, VolumeIncrease,
UIUp, UIDown, UILeft, UIRight, UIHome, UIEnd, UIPgUp, UIPgDown, UIUp, UIDown, UILeft, UIRight, UIHome, UIEnd, UIPgUp, UIPgDown,
UISelect, UINavPrev, UINavNext, UITabPrev, UITabNext, UIOK, UICancel, UISelect, UINavPrev, UINavNext, UIOK, UICancel,
LastType LastType
}; };

View File

@ -14,7 +14,7 @@
// See the file "license" for information on usage and redistribution of // See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
// //
// $Id: EventHandler.cxx,v 1.198 2007-01-19 21:53:25 stephena Exp $ // $Id: EventHandler.cxx,v 1.199 2007-01-24 21:36:38 stephena Exp $
//============================================================================ //============================================================================
#include <sstream> #include <sstream>
@ -2661,9 +2661,7 @@ EventHandler::ActionList EventHandler::ourMenuActionList[kMenuActionListSize] =
{ Event::UISelect, "Select item", 0 }, { Event::UISelect, "Select item", 0 },
{ Event::UINavPrev, "Previous object", 0 }, { Event::UINavPrev, "Previous object", 0 },
{ Event::UINavNext, "Next object", 0 }, { Event::UINavNext, "Next object", 0 }
{ Event::UITabPrev, "Previous tabgroup", 0 },
{ Event::UITabNext, "Next tabgroup", 0 }
}; };
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of // See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
// //
// $Id: EventHandler.hxx,v 1.99 2007-01-13 15:55:14 stephena Exp $ // $Id: EventHandler.hxx,v 1.100 2007-01-24 21:36:38 stephena Exp $
//============================================================================ //============================================================================
#ifndef EVENTHANDLER_HXX #ifndef EVENTHANDLER_HXX
@ -62,7 +62,7 @@ enum EventMode {
mapping can take place. mapping can take place.
@author Stephen Anthony @author Stephen Anthony
@version $Id: EventHandler.hxx,v 1.99 2007-01-13 15:55:14 stephena Exp $ @version $Id: EventHandler.hxx,v 1.100 2007-01-24 21:36:38 stephena Exp $
*/ */
class EventHandler class EventHandler
{ {
@ -466,7 +466,7 @@ class EventHandler
private: private:
enum { enum {
kEmulActionListSize = 80, kEmulActionListSize = 80,
kMenuActionListSize = 15 kMenuActionListSize = 13
}; };
// Structure used for action menu items // Structure used for action menu items

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of // See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
// //
// $Id: OSystemGP2X.cxx,v 1.25 2007-01-01 18:04:51 stephena Exp $ // $Id: OSystemGP2X.cxx,v 1.26 2007-01-24 21:36:38 stephena Exp $
// Modified on 2006/01/06 by Alex Zaballa for use on GP2X // Modified on 2006/01/06 by Alex Zaballa for use on GP2X
//============================================================================ //============================================================================
@ -115,9 +115,9 @@ void OSystemGP2X::setDefaultJoymap()
myEventHandler->setDefaultJoyMapping(Event::UIOK, kMenuMode, 0, 9); // Select myEventHandler->setDefaultJoyMapping(Event::UIOK, kMenuMode, 0, 9); // Select
myEventHandler->setDefaultJoyMapping(Event::UIPgUp, kMenuMode, 0, 10); // L myEventHandler->setDefaultJoyMapping(Event::UIPgUp, kMenuMode, 0, 10); // L
myEventHandler->setDefaultJoyMapping(Event::UIPgDown, kMenuMode, 0, 11); // R myEventHandler->setDefaultJoyMapping(Event::UIPgDown, kMenuMode, 0, 11); // R
myEventHandler->setDefaultJoyMapping(Event::UITabPrev, kMenuMode, 0, 12); // A // myEventHandler->setDefaultJoyMapping(Event::UITabPrev, kMenuMode, 0, 12); // A
myEventHandler->setDefaultJoyMapping(Event::UISelect, kMenuMode, 0, 13); // B myEventHandler->setDefaultJoyMapping(Event::UISelect, kMenuMode, 0, 13); // B
myEventHandler->setDefaultJoyMapping(Event::UITabNext, kMenuMode, 0, 14); // Y // myEventHandler->setDefaultJoyMapping(Event::UITabNext, kMenuMode, 0, 14); // Y
myEventHandler->setDefaultJoyMapping(Event::UICancel, kMenuMode, 0, 15); // X myEventHandler->setDefaultJoyMapping(Event::UICancel, kMenuMode, 0, 15); // X
myEventHandler->setDefaultJoyMapping(Event::UINavNext, kMenuMode, 0, 16); // Vol+ myEventHandler->setDefaultJoyMapping(Event::UINavNext, kMenuMode, 0, 16); // Vol+
myEventHandler->setDefaultJoyMapping(Event::UINavPrev, kMenuMode, 0, 17); // Vol- myEventHandler->setDefaultJoyMapping(Event::UINavPrev, kMenuMode, 0, 17); // Vol-

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of // See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
// //
// $Id: Dialog.cxx,v 1.54 2007-01-24 19:17:33 stephena Exp $ // $Id: Dialog.cxx,v 1.55 2007-01-24 21:36:38 stephena Exp $
// //
// Based on code from ScummVM - Scumm Interpreter // Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project // Copyright (C) 2002-2004 The ScummVM project
@ -319,10 +319,16 @@ void Dialog::handleKeyDown(int ascii, int keycode, int modifiers)
// not ascii?? // not ascii??
if(instance()->eventHandler().kbdShift(modifiers)) if(instance()->eventHandler().kbdShift(modifiers))
{ {
if(ascii == 256+20) // left arrow if(ascii == 256+20 && _ourTab) // left arrow
e = Event::UITabPrev; {
else if(ascii == 256+19) // right arrow _ourTab->cycleTab(-1);
e = Event::UITabNext; return;
}
else if(ascii == 256+19 && _ourTab) // right arrow
{
_ourTab->cycleTab(+1);
return;
}
else if(keycode == 9) // tab else if(keycode == 9) // tab
e = Event::UINavPrev; e = Event::UINavPrev;
} }
@ -468,22 +474,6 @@ bool Dialog::handleNavEvent(Event::Type e)
{ {
switch(e) switch(e)
{ {
case Event::UITabPrev:
if(_ourTab)
{
_ourTab->cycleTab(-1);
return true;
}
break;
case Event::UITabNext:
if(_ourTab)
{
_ourTab->cycleTab(+1);
return true;
}
break;
case Event::UINavPrev: case Event::UINavPrev:
if(_focusedWidget && !_focusedWidget->wantsTab()) if(_focusedWidget && !_focusedWidget->wantsTab())
{ {