Removed KidVid from the list of controllers for now. I won't have it

ready for the next minor point release, so there's no need for users
to see it.

When using 'quick-select' mode in list widgets (notably the ROM launcher),
treat space as a valid character, instead of stopping when space is
pressed.  Make quickselect be an option for ListWidgets, and disable
it for CheckBoxWidgets (cheat listing, rom dissassembly listing, etc).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1683 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2009-03-19 15:03:51 +00:00
parent 177d205e86
commit 4133668d75
4 changed files with 12 additions and 9 deletions

View File

@ -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: CheckListWidget.cxx,v 1.18 2009-01-01 18:13:38 stephena Exp $
// $Id: CheckListWidget.cxx,v 1.19 2009-03-19 15:03:50 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -25,7 +25,7 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CheckListWidget::CheckListWidget(GuiObject* boss, const GUI::Font& font,
int x, int y, int w, int h)
: ListWidget(boss, font, x, y, w, h)
: ListWidget(boss, font, x, y, w, h, false) // disable quick select
{
int ypos = _y + 2;

View File

@ -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.67 2009-03-16 00:23:42 stephena Exp $
// $Id: GameInfoDialog.cxx,v 1.68 2009-03-19 15:03:50 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -224,7 +224,7 @@ GameInfoDialog::GameInfoDialog(
ctrls.push_back("AmigaMouse", "AMIGAMOUSE" );
ctrls.push_back("AtariVox", "ATARIVOX" );
ctrls.push_back("SaveKey", "SAVEKEY" );
ctrls.push_back("KidVid", "KIDVID" );
//FIXME ctrls.push_back("KidVid", "KIDVID" );
myP0Controller = new PopUpWidget(myTab, font, xpos+lwidth, ypos,
pwidth, lineHeight, ctrls, "", 0, 0);
wid.push_back(myP0Controller);

View File

@ -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: ListWidget.cxx,v 1.55 2009-01-24 17:32:29 stephena Exp $
// $Id: ListWidget.cxx,v 1.56 2009-03-19 15:03:50 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -32,7 +32,7 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ListWidget::ListWidget(GuiObject* boss, const GUI::Font& font,
int x, int y, int w, int h)
int x, int y, int w, int h, bool quickSelect)
: EditableWidget(boss, font, x, y, 16, 16),
_rows(0),
_cols(0),
@ -42,6 +42,7 @@ ListWidget::ListWidget(GuiObject* boss, const GUI::Font& font,
_currentKeyDown(0),
_editMode(false),
_caretInverse(true),
_quickSelect(quickSelect),
_quickSelectTime(0)
{
_flags = WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS;
@ -218,7 +219,8 @@ bool ListWidget::handleKeyDown(int ascii, int keycode, int modifiers)
bool handled = true;
int oldSelectedItem = _selectedItem;
if (!_editMode && isalnum((char)ascii))
if (!_editMode && _quickSelect &&
((isalnum((char)ascii)) || isspace((char)ascii)))
{
// Quick selection mode: Go to first list item starting with this key
// (or a substring accumulated from the last couple key presses).

View File

@ -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: ListWidget.hxx,v 1.25 2009-01-05 22:05:35 stephena Exp $
// $Id: ListWidget.hxx,v 1.26 2009-03-19 15:03:51 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -46,7 +46,7 @@ class ListWidget : public EditableWidget
{
public:
ListWidget(GuiObject* boss, const GUI::Font& font,
int x, int y, int w, int h);
int x, int y, int w, int h, bool quickSelect = true);
virtual ~ListWidget();
int rows() const { return _rows; }
@ -111,6 +111,7 @@ class ListWidget : public EditableWidget
StringList _list;
string _backupString;
bool _quickSelect;
string _quickSelectStr;
int _quickSelectTime;