Commit 0c0732fb authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Use the new UIFC WIN_LEFTKEY/RIGHTKEY mode flags to enable indicators

A visual clue that there was a new navigation method available on some menus (where left/right arrow keys cycle through configured item) was needed. This seems to work nicely.
parent 85dce134
Pipeline #2868 passed with stage
in 9 minutes and 52 seconds
......@@ -674,7 +674,12 @@ void msgs_cfg()
"The left and right arrow keys may be used to cycle through message\n"
"groups.\n"
;
switch(uifc.list(WIN_ACT|WIN_T2B|WIN_EXTKEYS,6,0,60,&dflt,0,str,opt)) {
uifc_winmode_t wmode = WIN_ACT|WIN_T2B|WIN_EXTKEYS;
if(grpnum > 0)
wmode |= WIN_LEFTKEY;
if(grpnum + 1 < cfg.total_grps)
wmode |= WIN_RIGHTKEY;
switch(uifc.list(wmode,6,0,60,&dflt,0,str,opt)) {
case -1:
done=1;
break;
......
......@@ -402,16 +402,22 @@ void sub_cfg(uint grpnum)
"\n"
"The left and right arrow keys may be used to cycle through sub-boards.\n"
;
switch(uifc.list(WIN_ACT|WIN_SAV|WIN_BOT|WIN_L2R|WIN_EXTKEYS
,0,0,72,&opt_dflt,0,str,opt)) {
uifc_winmode_t wmode = WIN_ACT|WIN_SAV|WIN_BOT|WIN_L2R|WIN_EXTKEYS;
int prev = prev_subnum(cfg.sub[i]);
int next = next_subnum(cfg.sub[i]);
if(prev != i)
wmode |= WIN_LEFTKEY;
if(next != i)
wmode |= WIN_RIGHTKEY;
switch(uifc.list(wmode,0,0,72,&opt_dflt,0,str,opt)) {
case -1:
done=1;
break;
case -CIO_KEY_LEFT-2:
i = prev_subnum(cfg.sub[i]);
i = prev;
break;
case -CIO_KEY_RIGHT-2:
i = next_subnum(cfg.sub[i]);
i = next;
break;
case 0:
uifc.helpbuf=sub_long_name_help;
......
......@@ -439,7 +439,12 @@ void xfer_cfg()
"The left and right arrow keys may be used to cycle through file\n"
"libraries.\n"
;
switch(uifc.list(WIN_ACT|WIN_EXTKEYS,6,4,60,&dflt,0,str,opt)) {
uifc_winmode_t wmode = WIN_ACT|WIN_EXTKEYS;
if(libnum > 0)
wmode |= WIN_LEFTKEY;
if(libnum + 1 < cfg.total_libs)
wmode |= WIN_RIGHTKEY;
switch(uifc.list(wmode,6,4,60,&dflt,0,str,opt)) {
case -1:
done=1;
break;
......@@ -1275,16 +1280,22 @@ void dir_cfg(uint libnum)
"The left and right arrow keys may be used to cycle through file\n"
"directories.\n"
;
switch(uifc.list(WIN_SAV|WIN_ACT|WIN_L2R|WIN_BOT|WIN_EXTKEYS
,0,0,72,&opt_dflt,0,str,opt)) {
uifc_winmode_t wmode = WIN_SAV|WIN_ACT|WIN_L2R|WIN_BOT|WIN_EXTKEYS;
int prev = prev_dirnum(cfg.dir[i]);
int next = next_dirnum(cfg.dir[i]);
if(prev != i)
wmode |= WIN_LEFTKEY;
if(next != i)
wmode |= WIN_RIGHTKEY;
switch(uifc.list(wmode,0,0,72,&opt_dflt,0,str,opt)) {
case -1:
done=1;
break;
case -CIO_KEY_LEFT-2:
i = prev_dirnum(cfg.dir[i]);
i = prev;
break;
case -CIO_KEY_RIGHT-2:
i = next_dirnum(cfg.dir[i]);
i = next;
break;
case 0:
uifc.helpbuf=dir_long_name_help;
......
......@@ -1224,16 +1224,23 @@ void xtrn_cfg(uint section)
"\n"
"The left and right arrow keys may be used to cycle through programs.\n"
;
switch(uifc.list(WIN_SAV|WIN_ACT|WIN_MID|WIN_EXTKEYS,0,0,60,&opt_dflt,&sub_bar,cfg.xtrn[i]->name
uifc_winmode_t wmode = WIN_SAV|WIN_ACT|WIN_MID|WIN_EXTKEYS;
int prev = prev_program(i);
int next = next_program(i);
if(prev != i)
wmode |= WIN_LEFTKEY;
if(next != i)
wmode |= WIN_RIGHTKEY;
switch(uifc.list(wmode,0,0,60,&opt_dflt,&sub_bar,cfg.xtrn[i]->name
,opt)) {
case -1:
done=1;
break;
case -CIO_KEY_LEFT-2:
i = prev_program(i);
i = prev;
break;
case -CIO_KEY_RIGHT-2:
i = next_program(i);
i = next;
break;
case 0:
uifc.helpbuf=
......@@ -2421,7 +2428,12 @@ void xtrnsec_cfg()
"The left and right arrow keys may be used to cycle through program\n"
"sections.\n"
;
switch(uifc.list(WIN_SAV|WIN_ACT|WIN_MID|WIN_EXTKEYS,0,0,60,&xtrnsec_opt,0,str
uifc_winmode_t wmode = WIN_SAV|WIN_ACT|WIN_MID|WIN_EXTKEYS;
if(i > 0)
wmode |= WIN_LEFTKEY;
if(i + 1 < cfg.total_xtrnsecs)
wmode |= WIN_RIGHTKEY;
switch(uifc.list(wmode,0,0,60,&xtrnsec_opt,0,str
,opt)) {
case -1:
done=1;
......
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