Mail Archives: djgpp/1997/06/19/15:15:09
Here is a change to Allegro's move_focus routine that worked for me to
change the behaviour of the tab key. I just moved the KEY_TAB entry in
the switch statement so that it falls through to the KEY_DOWN case. The
shift-tab key could be added to the case statement so that it falls
through to the KEY_UP case.
static int move_focus(DIALOG *d, long ch, int *focus_obj)
{
int (*cmp)(DIALOG *d1, DIALOG *d2);
OBJ_LIST obj[MAX_OBJECTS];
int obj_count = 0;
int fobj, c;
int res = D_O_K;
/* choose a comparison function */
switch (ch >> 8) {
case KEY_RIGHT: cmp = cmp_right; break;
case KEY_LEFT: cmp = cmp_left; break;
case KEY_TAB: /* MY CHANGE: same as down arrow */
case KEY_DOWN: cmp = cmp_down; break;
case KEY_UP: cmp = cmp_up; break;
default: return D_O_K;
}
--
Alan Doerhoefer: aland AT seanet DOT com
http://www.seanet.com/~aland
- Raw text -