Added flag settings menu (work in progress). Fixed bug in transp. command execution.

This commit is contained in:
claudiol 2016-11-07 13:04:21 -05:00
parent 663c5a3d9b
commit 16a2de317f
3 changed files with 51 additions and 5 deletions

View file

@ -449,7 +449,7 @@ else rplCleanup();
if(rplDepthData()>nresults) {
BINT f;
BINT depth=rplDepthData(),offset=depth-nresults;
for(f=depth;f>depth-nresults;++f) {
for(f=depth;f>depth-nresults;--f) {
rplOverwriteData(f,rplPeekData(f-offset));
}
rplDropData(offset);

View file

@ -80,6 +80,7 @@ INCLUDE_ROMOBJECT(sysmenu_7_flags);
INCLUDE_ROMOBJECT(sysmenu_8_menu);
INCLUDE_ROMOBJECT(sysmenu_9_clipboard);
INCLUDE_ROMOBJECT(sysmenu_10_settings);
INCLUDE_ROMOBJECT(sysmenu_11_namedflags);
@ -142,6 +143,7 @@ const WORDPTR const ROMPTR_TABLE[]={
(WORDPTR)sysmenu_8_menu,
(WORDPTR)sysmenu_9_clipboard,
(WORDPTR)sysmenu_10_settings,
(WORDPTR)sysmenu_11_namedflags,
(WORDPTR)dotsettings_ident,
(WORDPTR)flags_ident,
@ -1444,7 +1446,7 @@ void LIB_HANDLER()
break;
default:
if((MENUNUMBER(MenuCodeArg)<=10)&&(MENUNUMBER(MenuCodeArg)>1)) menuobj=ROMPTR_TABLE[MENUNUMBER(MenuCodeArg)-1];
if((MENUNUMBER(MenuCodeArg)<=11)&&(MENUNUMBER(MenuCodeArg)>1)) menuobj=ROMPTR_TABLE[MENUNUMBER(MenuCodeArg)-1];
else menuobj=0;
}
if(!menuobj) ObjectPTR=(WORDPTR)empty_list;

View file

@ -86,15 +86,59 @@ COPYCLIP CUTCLIP PASTECLIP
@#name sysmenu_10_settings
{
{ { "Flags" 1 } :: #0440B000h TMENULST ; }
SETPREC GETPREC SETLOCALE SETNUMFORMAT DEG GRAD RAD DMS
}
@#name sysmenu_11_namedflags
{
{ "DEG" :: DEG ; }
{ "RAD" :: RAD ; }
{ "GRAD" :: GRAD ; }
@ ANGLE SYSTEM FLAG TOGGLE
{
:: ##1,MAKESINT(FL_ANGLEMODE1) FS? ##1,MAKESINT(FL_ANGLEMODE2) FS? 2 * +
CASE
DUP 0 == THEN "∡°" END
DUP 1 == THEN "∡r" END
DUP 2 == THEN "∡g" END
DUP 3 == THEN "∡d" END
END
;
:: ##1,MAKESINT(FL_ANGLEMODE1) FS? ##1,MAKESINT(FL_ANGLEMODE2) FS? 2 * +
1 +
##1,MAKESINT(FL_ANGLEMODE1) IF OVER 1 BAND THEN SF ELSE CF END
##1,MAKESINT(FL_ANGLEMODE2) IF SWAP 2 BAND THEN SF ELSE CF END
;
"Current angle system
Deg→Rad→Grad→DMS
"
}
@ COMPLEX MODE FLAG TOGGLE
{
:: ##1,MAKESINT(FL_COMPLEXMODE) IF FS? THEN "■CPLX" ELSE "CPLX" END ;
:: ##1,MAKESINT(FL_COMPLEXMODE) IF DUP FS? THEN CF ELSE SF END ; @ ACTION: NO SHIFTS
"Complex mode:
Complex results are allowed.
"
}
@ "STRIPCOMMENTS" FLAG TOGGLE
{
:: ##1,MAKESINT(FL_STRIPCOMMENTS) IF FS? THEN "■STRIP" ELSE "STRIP" END ;
:: ##1,MAKESINT(FL_STRIPCOMMENTS) IF DUP FS? THEN CF ELSE SF END ; @ ACTION: NO SHIFTS
"Strip Comments:
Compiler removes comments
when set"
}
@ "ACTIVEMENU1/2" FLAG TOGGLE
{
:: ##1,MAKESINT(FL_ACTIVEMENU) IF FS? THEN "2MENU" ELSE "1MENU" END ;
:: ##1,MAKESINT(FL_ACTIVEMENU) IF DUP FS? THEN CF ELSE SF END ; @ ACTION: NO SHIFTS
"Changes currently active
menu (1 or 2)"
}
}