diff --git a/assets/background.png b/assets/background.png index 82f3be1..bf85f64 100644 Binary files a/assets/background.png and b/assets/background.png differ diff --git a/assets/fxconv-metadata.txt b/assets/fxconv-metadata.txt index 8da7e0d..056cb53 100644 --- a/assets/fxconv-metadata.txt +++ b/assets/fxconv-metadata.txt @@ -1,6 +1,7 @@ # gint bopti_image_t background.png: type: bopti-image + profile: p4 name: bimg_background bar3.png: type: bopti-image @@ -8,4 +9,5 @@ bar3.png: name: bimg_bar3 icons.png: type: bopti-image + profile: p4 name: bimg_icons diff --git a/assets/icons.png b/assets/icons.png index 63db595..f0b2376 100644 Binary files a/assets/icons.png and b/assets/icons.png differ diff --git a/include/bar.h b/include/bar.h index ddae9ba..755d51d 100644 --- a/include/bar.h +++ b/include/bar.h @@ -8,9 +8,9 @@ extern bopti_image_t bimg_icons; #define BAR_Y 48 #define BAR_HEIGHT (DHEIGHT - BAR_Y - 16) #define BAR_BASE_FILL 0.5 -#define BAR_ICON_HEIGHT 16 -#define BAR_ICON_WIDTH 16 -#define BAR_ICON_Y (BAR_Y - BAR_ICON_HEIGHT - 16) +#define BAR_ICON_HEIGHT 24 +#define BAR_ICON_WIDTH 24 +#define BAR_ICON_Y (BAR_Y - BAR_ICON_HEIGHT - 12) struct Bar { int id; diff --git a/include/choice.h b/include/choice.h index 0ebf074..e74f839 100644 --- a/include/choice.h +++ b/include/choice.h @@ -6,8 +6,8 @@ #define CHOICE_OK "OK" #define BUTTON_WIDTH 52 -#define BUTTON_HEIGHT 32 -#define BUTTON_Y (DHEIGHT - BUTTON_HEIGHT * 1.7) +#define BUTTON_HEIGHT 24 +#define BUTTON_Y (DHEIGHT - BUTTON_HEIGHT - 12) struct Choice { int cursor; diff --git a/src/bar/draw.c b/src/bar/draw.c index 033da01..762a8d8 100644 --- a/src/bar/draw.c +++ b/src/bar/draw.c @@ -25,6 +25,7 @@ bar_draw(struct Bar bar) dsubimage(bar.x, i, vimg_bar3, 0, bar.limit_height, vimg_bar3->width, 1, DIMAGE_NOCLIP); /* draw icons */ - dsubimage(bar.x, BAR_ICON_Y, &bimg_icons, BAR_ICON_WIDTH * bar.id, 0, - BAR_ICON_WIDTH, BAR_ICON_HEIGHT, DIMAGE_NOCLIP); + dsubimage(bar.x + (BAR_WIDTH - BAR_ICON_WIDTH) / 2, BAR_ICON_Y, + &bimg_icons, BAR_ICON_WIDTH * bar.id, 0, BAR_ICON_WIDTH, + BAR_ICON_HEIGHT, DIMAGE_NOCLIP); } diff --git a/src/main.c b/src/main.c index af7b55f..63ae41a 100644 --- a/src/main.c +++ b/src/main.c @@ -16,7 +16,7 @@ main(void) { int i; key_event_t key_ev; - usb_interface_t const *interfaces[] = { &usb_ff_bulk, NULL }; + usb_interface_t const *interfaces[] = {&usb_ff_bulk, NULL}; /* init */ usb_open(interfaces, GINT_CALL_NULL); @@ -43,18 +43,15 @@ main(void) static void main_draw(void) { - static color_t colors[4] = { C_RED, C_GREEN, C_BLUE, C_WHITE }; extern bopti_image_t bimg_background; int i; /* draw background */ - dimage(0, 0, &bimg_background); + dimage(-2, 0, &bimg_background); /* draw bars */ - for (i = 0; i < BAR_TOTAL; i += 1) { - *vcol_bar3 = colors[i]; + for (i = 0; i < BAR_TOTAL; i += 1) bar_draw(bars[i]); - } /* draw choice */ choice_draw(choice);