Commit 62ccdba6 authored by deuce's avatar deuce
Browse files

Modify WIN_POP to be the same as an ESC

Add WIN_SEL which is the same as a CR
parent e69a6d3c
......@@ -139,7 +139,10 @@
#define WIN_EDIT (1<<27) /* Allow F2 to edit a menu item */
#define WIN_EDITACT (1<<28) /* Remain active after edit key */
#define WIN_INACT (1<<29) /* Draw window inactive... intended for use with WIN_IMM */
#define WIN_POP (1<<30) /* Exit the list. Intended for use after a WIN_EXTKEYS or WIN_DYN */
#define WIN_POP (1<<30) /* Exit the list. Act as though ESC was pressed. */
/* Intended for use after a WIN_EXTKEYS or WIN_DYN */
#define WIN_SEL (1<<31) /* Exit the list. Act as though ENTER was pressed. */
/* Intended for use after a WIN_EXTKEYS or WIN_DYN */
#define WIN_MID WIN_L2R|WIN_T2B /* Place window in middle of screen */
......
......@@ -966,8 +966,10 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
if(api->timedisplay != NULL)
api->timedisplay(/* force? */FALSE);
gotkey=0;
if(kbwait() || (mode&WIN_POP)) {
if(kbwait() || (mode&(WIN_POP|WIN_SEL))) {
if(mode&WIN_POP)
gotkey=ESC;
else if(mode&WIN_SEL)
gotkey=CR;
else
gotkey=inkey();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment