updated minui to use new GFX_blitButtonGroup()
This commit is contained in:
parent
44b2cf610d
commit
130a1e0e9d
1 changed files with 10 additions and 36 deletions
|
|
@ -1535,54 +1535,28 @@ int main (int argc, char *argv[]) {
|
||||||
// GFX_blitBodyCopy("Empty folder", screen, &(SDL_Rect){0,0,SCREEN_WIDTH,SCREEN_HEIGHT});
|
// GFX_blitBodyCopy("Empty folder", screen, &(SDL_Rect){0,0,SCREEN_WIDTH,SCREEN_HEIGHT});
|
||||||
}
|
}
|
||||||
|
|
||||||
char* hint;
|
|
||||||
char* button;
|
|
||||||
if (show_setting) {
|
if (show_setting) {
|
||||||
hint = "BRIGHTNESS";
|
GFX_blitButtonGroup((char*[]){ "MENU","BRIGHTNESS", NULL }, screen, 0);
|
||||||
button = "MENU";
|
|
||||||
}
|
}
|
||||||
else if (can_resume) {
|
else if (can_resume) {
|
||||||
hint = "RESUME";
|
GFX_blitButtonGroup((char*[]){ "X","RESUME", NULL }, screen, 0);
|
||||||
button = "X";
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
hint = "SLEEP";
|
GFX_blitButtonGroup((char*[]){ "POWER","SLEEP", NULL }, screen, 0);
|
||||||
button = "POWER";
|
|
||||||
}
|
}
|
||||||
ox = SCALE1(PADDING);
|
|
||||||
oy = SCREEN_HEIGHT - SCALE1(PADDING + PILL_SIZE);
|
|
||||||
GFX_blitPill(ASSET_DARK_GRAY_PILL, screen, &(SDL_Rect){
|
|
||||||
ox,
|
|
||||||
oy,
|
|
||||||
SCALE1(BUTTON_MARGIN * 2) + GFX_getButtonWidth(hint, button),
|
|
||||||
SCALE1(PILL_SIZE)
|
|
||||||
});
|
|
||||||
GFX_blitButton(hint, button, screen, &(SDL_Rect){
|
|
||||||
ox + SCALE1(BUTTON_MARGIN),
|
|
||||||
oy + SCALE1(BUTTON_MARGIN)
|
|
||||||
});
|
|
||||||
|
|
||||||
if (total==0) {
|
if (total==0) {
|
||||||
if (stack->count>1) {
|
if (stack->count>1) {
|
||||||
hint = "BACK";
|
GFX_blitButtonGroup((char*[]){ "B","BACK", NULL }, screen, 1);
|
||||||
button = "B";
|
|
||||||
ow = GFX_getButtonWidth(hint, button);
|
|
||||||
ox = SCREEN_WIDTH - ow - SCALE1(PADDING);
|
|
||||||
oy = SCREEN_HEIGHT - SCALE1(PADDING + PILL_SIZE);
|
|
||||||
GFX_blitPill(ASSET_DARK_GRAY_PILL, screen, &(SDL_Rect){
|
|
||||||
ox,
|
|
||||||
oy,
|
|
||||||
SCALE1(BUTTON_MARGIN * 2) + ow,
|
|
||||||
SCALE1(PILL_SIZE)
|
|
||||||
});
|
|
||||||
GFX_blitButton(hint, button, screen, &(SDL_Rect){
|
|
||||||
ox + SCALE1(BUTTON_MARGIN),
|
|
||||||
oy + SCALE1(BUTTON_MARGIN)
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
GFX_blitABButtons("OPEN", stack->count>1?"BACK":NULL, screen);
|
if (stack->count>1) {
|
||||||
|
GFX_blitButtonGroup((char*[]){ "B","BACK", "A","OPEN", NULL }, screen, 1);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
GFX_blitButtonGroup((char*[]){ "A","OPEN", NULL }, screen, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue