mirror of
https://github.com/suchmememanyskill/TegraExplorer.git
synced 2024-11-26 05:42:07 +00:00
Optimise screen scroll a bit, Edit display of filesizes
This commit is contained in:
parent
4c4a6511f3
commit
bd99e2a138
7 changed files with 28 additions and 7 deletions
|
@ -269,6 +269,12 @@ void gfx_putc(char c)
|
|||
if (gfx_con.y > gfx_ctxt.height - 8)
|
||||
gfx_con.y = 0;
|
||||
}
|
||||
else if (c == '\e')
|
||||
gfx_con.x = 672;
|
||||
else if (c == '\a')
|
||||
gfx_con.x = 608;
|
||||
else if (c == '\r')
|
||||
gfx_con.x = 0;
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -513,6 +519,12 @@ void gfx_set_rect_grey(const u8 *buf, u32 size_x, u32 size_y, u32 pos_x, u32 pos
|
|||
}
|
||||
}
|
||||
|
||||
void gfx_boxGrey(int x0, int y0, int x1, int y1, u8 shade){
|
||||
for (int y = y0; y <= y1; y++){
|
||||
memset(gfx_ctxt.fb + y * gfx_ctxt.stride + x0, shade, (x1 - x0) * 4);
|
||||
}
|
||||
}
|
||||
|
||||
void gfx_box(int x0, int y0, int x1, int y1, u32 color){
|
||||
for (int x = x0; x < x1 + 1; x++){
|
||||
for (int y = y0; y < y1 + 1; y++){
|
||||
|
|
|
@ -50,6 +50,7 @@ void gfx_set_rect_rgb(const u8 *buf, u32 size_x, u32 size_y, u32 pos_x, u32 pos_
|
|||
void gfx_set_rect_argb(const u32 *buf, u32 size_x, u32 size_y, u32 pos_x, u32 pos_y);
|
||||
void gfx_render_bmp_argb(const u32 *buf, u32 size_x, u32 size_y, u32 pos_x, u32 pos_y);
|
||||
void gfx_box(int x0, int y0, int x1, int y1, u32 color);
|
||||
void gfx_boxGrey(int x0, int y0, int x1, int y1, u8 shade);
|
||||
|
||||
// Global gfx console and context.
|
||||
gfx_ctxt_t gfx_ctxt;
|
||||
|
|
|
@ -5,7 +5,7 @@ extern const char *gfx_file_size_names[];
|
|||
extern const char *menu_sd_states[];
|
||||
extern const char *emmc_fs_entries[];
|
||||
extern const char *utils_err_codes[];
|
||||
extern const char *pkg2names[];
|
||||
//extern const char *pkg2names[];
|
||||
extern const char *mainmenu_credits;
|
||||
|
||||
enum utils_err_codes_te_call {
|
||||
|
|
|
@ -54,7 +54,7 @@ const char *utils_err_codes_te[] = { // these start at 50
|
|||
"CANNOT COPY FILE TO FS PART",
|
||||
"NO DESTENATION"
|
||||
};
|
||||
|
||||
/*
|
||||
const char *pkg2names[] = {
|
||||
"BCPKG2-1-Normal-Main",
|
||||
"BCPKG2-2-Normal-Sub",
|
||||
|
@ -63,5 +63,5 @@ const char *pkg2names[] = {
|
|||
"BCPKG2-5-Repair-Main",
|
||||
"BCPKG2-6-Repair-Sub"
|
||||
};
|
||||
|
||||
*/
|
||||
const char *mainmenu_credits = "\nTegraexplorer, made by:\nSuch Meme, Many Skill\n\nProject based on:\nLockpick_RCM\nHekate\n\nCool people:\nshchmue\ndennthecafebabe\nDax";
|
|
@ -64,9 +64,9 @@ menu_entry fs_menu_folder[] = {
|
|||
};
|
||||
|
||||
menu_entry fs_menu_startdir[] = {
|
||||
{"Folder -> previous folder ", COLOR_ORANGE, ISMENU},
|
||||
{"Clipboard -> Current folder ", COLOR_ORANGE, ISMENU},
|
||||
{"Current folder menu ", COLOR_ORANGE, ISMENU}
|
||||
{"Folder -> previous folder ", COLOR_ORANGE, ISMENU},
|
||||
{"Clipboard -> Current folder", COLOR_ORANGE, ISMENU},
|
||||
{"Current folder menu ", COLOR_ORANGE, ISMENU}
|
||||
};
|
||||
|
||||
gpt_entry_rule gpt_fs_rules[] = {
|
||||
|
|
|
@ -115,8 +115,13 @@ void gfx_printandclear(char *in, int length){
|
|||
gfx_con_getpos(&x, &y);
|
||||
RESETCOLOR;
|
||||
|
||||
|
||||
/*
|
||||
for (int i = (703 - x) / 16; i > 0; i--)
|
||||
gfx_printf(" ");
|
||||
*/
|
||||
|
||||
gfx_boxGrey(x, y, 703, y + 16, 0x1B);
|
||||
|
||||
gfx_con_setpos(x, y);
|
||||
|
||||
|
|
|
@ -53,7 +53,10 @@ void _printentry(menu_entry entry, bool highlighted, bool refresh){
|
|||
else {
|
||||
SWAPCOLOR(COLOR_BLUE);
|
||||
SWAPBGCOLOR(COLOR_DEFAULT);
|
||||
gfx_printf("\a%d\e%s", entry.storage, gfx_file_size_names[size - 4]);
|
||||
gfx_printf("\a%4d", entry.storage);
|
||||
gfx_con.fntsz = 8;
|
||||
gfx_printf("\n\e%s\n", gfx_file_size_names[size - 4]);
|
||||
gfx_con.fntsz = 16;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue