Visual emphasis on directory menus

This commit is contained in:
claudio 2015-08-25 20:48:29 -04:00
parent 2097ba6baa
commit d589ab343b
3 changed files with 40 additions and 6 deletions

View file

@ -380,7 +380,9 @@ void halRedrawMenu2(DRAWSURFACE *scr)
BINT w=StringWidthN((char *)(*var+1),(char *)(*var+1)+rplGetIdentLength(*var),halScreen.MenuFont);
if(w>=scr->clipx2-scr->clipx+1) w=scr->clipx;
else w=(scr->clipx2+scr->clipx-w)>>1;
DrawTextN(w,scr->clipy,(char *)(*var+1),(char *)(*var+1)+rplGetIdentLength(*var),halScreen.MenuFont,0xF,scr);
if(ISDIR(*var[1])) DrawTextN(w+1,scr->clipy,(char *)(*var+1),(char *)(*var+1)+rplGetIdentLength(*var),halScreen.MenuFont,0xf,scr);
DrawTextN(w,scr->clipy,(char *)(*var+1),(char *)(*var+1)+rplGetIdentLength(*var),halScreen.MenuFont,0x0,scr);
}
}
@ -397,7 +399,9 @@ void halRedrawMenu2(DRAWSURFACE *scr)
BINT w=StringWidthN((char *)(*var+1),(char *)(*var+1)+rplGetIdentLength(*var),halScreen.MenuFont);
if(w>=scr->clipx2-scr->clipx+1) w=scr->clipx;
else w=(scr->clipx2+scr->clipx-w)>>1;
DrawTextN(w,scr->clipy,(char *)(*var+1),(char *)(*var+1)+rplGetIdentLength(*var),halScreen.MenuFont,0xF,scr);
if(ISDIR(*var[1])) DrawTextN(w+1,scr->clipy,(char *)(*var+1),(char *)(*var+1)+rplGetIdentLength(*var),halScreen.MenuFont,0xf,scr);
DrawTextN(w,scr->clipy,(char *)(*var+1),(char *)(*var+1)+rplGetIdentLength(*var),halScreen.MenuFont,0x0,scr);
}
}
@ -411,11 +415,12 @@ void halRedrawMenu2(DRAWSURFACE *scr)
BINT w=StringWidthN((char *)(*var+1),(char *)(*var+1)+rplGetIdentLength(*var),halScreen.MenuFont);
if(w>=scr->clipx2-scr->clipx+1) w=scr->clipx;
else w=(scr->clipx2+scr->clipx-w)>>1;
DrawTextN(w,scr->clipy,(char *)(*var+1),(char *)(*var+1)+rplGetIdentLength(*var),halScreen.MenuFont,0xF,scr);
if(ISDIR(*var[1])) DrawTextN(w+1,scr->clipy,(char *)(*var+1),(char *)(*var+1)+rplGetIdentLength(*var),halScreen.MenuFont,0xf,scr);
DrawTextN(w,scr->clipy,(char *)(*var+1),(char *)(*var+1)+rplGetIdentLength(*var),halScreen.MenuFont,0x0,scr);
}
} else {
if(nvars>6) {
DrawText(scr->clipx,scr->clipy,"NXT...",halScreen.MenuFont,0xF,scr);
DrawText(scr->clipx,scr->clipy,"NXT...",halScreen.MenuFont,0x0,scr);
}
}

View file

@ -44,7 +44,7 @@ void main_virtual()
halInitScreen();
halInitKeyboard();
halSetBusyHandler();
halInitBusyHandler();
halRedrawAll(&scr);
if(wascleared) halShowMsg("Memory Cleared");

View file

@ -442,10 +442,39 @@ void rplWarmInit(void)
BINT2RealIdx=0;
// FINALLY, CHECK EXISTING MEMORY FOR DAMAGE AND REPAIR AUTOMATICALLY
rplVerifyTempOb(1);
rplVerifyDirectories(1);
// VERIFY IF SETTINGS AND ROOT DIRECTORY ARE PROPERLY SET
WORDPTR *settings=rplFindGlobal((WORDPTR)dotsettings_ident,0);
if(settings) SettingsDir=settings[1];
else {
// CREATE THE SETTINGS DIRECTORY
// INITIALIZE THE SETTINGS DIRECTORY
SettingsDir=(WORDPTR)rplCreateNewDir((WORDPTR)dotsettings_ident,CurrentDir);
// CREATE AN EMPTY LIST OF SYSTEM FLAGS
SystemFlags=rplAllocTempOb(7); // FOR NOW: 128 SYSTEM FLAGS IN 2 BINTS WITH 64 BITS EACH
if(!SystemFlags) return;
SystemFlags[0]=MKPROLOG(DOLIST,7); // PUT ALL SYSTEM FLAGS ON A LIST
SystemFlags[1]=MKPROLOG(HEXBINT,2); // USE A BINT PROLOG
SystemFlags[2]=(63<<4)|(1<<29)|(7<<10); // FLAGS 0-31 ARE IN SystemFlags[2], DEFAULTS: WORDSIZE=63, DEG, COMMENTS=ON, 7*8=56 UNDO LEVELS
SystemFlags[3]=0; // FLAGS 32-63 ARE IN SystemFlags[3]
SystemFlags[4]=MKPROLOG(HEXBINT,2);
SystemFlags[5]=0; // FLAGS 64-95 ARE IN SystemFlags[5]
SystemFlags[6]=0; // FLAGS 96-127 ARE IN SystemFlags[6]
// FUTURE EXPANSION: ADD MORE FLAGS HERE
SystemFlags[7]=CMD_ENDLIST; // CLOSE THE LIST
rplStoreSettings((WORDPTR)flags_ident,SystemFlags);
}
}