mirror of https://github.com/stella-emu/stella.git
Made the arrow keys in DataGridWidget 'wrap around', so that when the end
a row/column is reached, it goes to the next row/column. The reason for this will become apparent over the next day or so. Still TODO is revamp the base widget to accept and return an identifier for which widget it is, since every widget/dialog in the debugger currently assumes that there's only one type of each widget (so if there are two DataGridWidgets, the returned signal doesn't know which one to use). Sorry if that sounds confusing ;) git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@607 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
fe8c605d8d
commit
3e0a2db948
|
@ -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: DataGridWidget.cxx,v 1.9 2005-07-04 15:59:38 stephena Exp $
|
||||
// $Id: DataGridWidget.cxx,v 1.10 2005-07-05 00:07:57 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -208,6 +208,12 @@ bool DataGridWidget::handleKeyDown(int ascii, int keycode, int modifiers)
|
|||
_currentRow--;
|
||||
dirty = true;
|
||||
}
|
||||
else if(_currentCol > 0)
|
||||
{
|
||||
_currentRow = _rows - 1;
|
||||
_currentCol--;
|
||||
dirty = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case 256+18: // down arrow
|
||||
|
@ -216,6 +222,12 @@ bool DataGridWidget::handleKeyDown(int ascii, int keycode, int modifiers)
|
|||
_currentRow++;
|
||||
dirty = true;
|
||||
}
|
||||
else if(_currentCol < (int) _cols - 1)
|
||||
{
|
||||
_currentRow = 0;
|
||||
_currentCol++;
|
||||
dirty = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case 256+20: // left arrow
|
||||
|
@ -224,6 +236,12 @@ bool DataGridWidget::handleKeyDown(int ascii, int keycode, int modifiers)
|
|||
_currentCol--;
|
||||
dirty = true;
|
||||
}
|
||||
else if(_currentRow > 0)
|
||||
{
|
||||
_currentCol = _cols - 1;
|
||||
_currentRow--;
|
||||
dirty = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case 256+19: // right arrow
|
||||
|
@ -232,6 +250,12 @@ bool DataGridWidget::handleKeyDown(int ascii, int keycode, int modifiers)
|
|||
_currentCol++;
|
||||
dirty = true;
|
||||
}
|
||||
else if(_currentRow < (int) _rows - 1)
|
||||
{
|
||||
_currentCol = 0;
|
||||
_currentRow++;
|
||||
dirty = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case 256+24: // pageup
|
||||
|
|
|
@ -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: FSNodeWin32.cxx,v 1.5 2005-06-16 00:56:00 stephena Exp $
|
||||
// $Id: FSNodeWin32.cxx,v 1.6 2005-07-05 00:07:58 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
|
Loading…
Reference in New Issue