Horizontal TE, proper edition

yes i can't git, shut
This commit is contained in:
Such Meme, Many Skill
2020-04-30 23:40:26 +02:00
parent 931cbc829f
commit 305c372d8c
4 changed files with 73 additions and 40 deletions

View File

@@ -19,11 +19,11 @@ void gfx_clearscreen(){
SWAPCOLOR(COLOR_DEFAULT);
SWAPBGCOLOR(COLOR_WHITE);
gfx_box(0, 1263, 719, 1279, COLOR_WHITE);
gfx_con_setpos(0, 1263);
gfx_boxGrey(0, 703, 1279, 719, 0xFF);
gfx_con_setpos(0, 703);
gfx_printf("Move: Vol+/- | Select: Pow | Battery: %3d%%", battery >> 8);
gfx_box(0, 0, 719, 15, COLOR_WHITE);
gfx_boxGrey(0, 0, 1279, 15, 0xFF);
gfx_con_setpos(0, 0);
gfx_printf("Tegraexplorer v1.5.2\n");
@@ -121,7 +121,7 @@ void gfx_printandclear(char *in, int length){
gfx_printf(" ");
*/
gfx_boxGrey(x, y, 703, y + 16, 0x1B);
gfx_boxGrey(x, y, 687, y + 15, 0x1B);
gfx_con_setpos(x, y);

View File

@@ -61,7 +61,7 @@ void _printentry(menu_entry entry, bool highlighted, bool refresh){
}
int menu_make(menu_entry *entries, int amount, char *toptext){
int currentpos = 0, res = 0, offset = 0, delay = 300, minscreen = 0, maxscreen = 59, calculatedamount = 0;
int currentpos = 0, res = 0, offset = 0, delay = 300, minscreen = 0, maxscreen = 29, calculatedamount = 0;
u32 scrolltimer, timer;
bool refresh = false;
@@ -71,7 +71,7 @@ int menu_make(menu_entry *entries, int amount, char *toptext){
if (!(entries[i].property & ISMENU))
calculatedamount++;
gfx_con_setpos(512, 0);
gfx_con_setpos(1071, 0);
if (calculatedamount){
SWAPCOLOR(COLOR_DEFAULT);
SWAPBGCOLOR(COLOR_WHITE);
@@ -113,11 +113,11 @@ int menu_make(menu_entry *entries, int amount, char *toptext){
refresh = true;
}
for (int i = 0 + offset; i < amount && i < 60 + offset; i++)
for (int i = 0 + offset; i < amount && i < 30 + offset; i++)
if (!(entries[i].property & ISHIDE))
_printentry(entries[i], (i == currentpos), refresh);
gfx_printf("\n%k%K %s %s\n\nTime taken for screen draw: %dms", COLOR_BLUE, COLOR_DEFAULT, (offset + 60 < amount) ? "v" : " ", (offset > 0) ? "^" : " ", get_tmr_ms() - timer);
gfx_printf("\n%k%K %s %s\n\nTime taken for screen draw: %dms ", COLOR_BLUE, COLOR_DEFAULT, (offset + 30 < amount) ? "v" : " ", (offset > 0) ? "^" : " ", get_tmr_ms() - timer);
while (btn_read() & BTN_POWER);