Added main menu.
This commit is contained in:
@ -7,8 +7,20 @@
|
||||
|
||||
#include "drawstatemainmenu.h"
|
||||
#include "display/draw/drawtext.h"
|
||||
#include "display/draw/drawui.h"
|
||||
#include "ui/mainmenu.h"
|
||||
|
||||
void drawStateMainMenu() {
|
||||
// Draw the logo
|
||||
drawText("Dawn", 4, 0, 0, COLOR_WHITE);
|
||||
|
||||
// Draw the menu
|
||||
uint16_t width = menuGetLongestStringLength(&MAIN_MENU) + 3;
|
||||
uint16_t height = MAIN_MENU.rows + 2;
|
||||
drawUIMenuBox(
|
||||
&MAIN_MENU,
|
||||
(FRAME_WIDTH - width) / 2, FRAME_HEIGHT - height - 4,
|
||||
width, height,
|
||||
COLOR_WHITE, COLOR_WHITE, COLOR_WHITE
|
||||
);
|
||||
}
|
@ -36,5 +36,4 @@ void drawStateOverworld() {
|
||||
|
||||
// Draw UI
|
||||
drawUITextbox();
|
||||
// drawUITestMenu();
|
||||
}
|
@ -225,13 +225,4 @@ void drawUITextbox() {
|
||||
int32_t blink = (int32_t)(TIME.time * DRAW_UI_TEXTBOX_BLINKS_PER_SECOND) % 2;
|
||||
FRAME_BUFFER[DRAW_UI_TEXTBOX_CURSOR_POS + 1] = blink ? '>' : ' ';
|
||||
FRAME_BUFFER[DRAW_UI_TEXTBOX_CURSOR_POS + 2] = blink ? ' ' : '>';
|
||||
}
|
||||
|
||||
void drawUITestMenu() {
|
||||
drawUIMenuBox(
|
||||
&TEST_MENU.menu,
|
||||
0, 0,
|
||||
FRAME_WIDTH, 5,
|
||||
COLOR_CYAN, COLOR_RED, COLOR_WHITE
|
||||
);
|
||||
}
|
@ -80,9 +80,4 @@ void drawUIMenuBox(
|
||||
/**
|
||||
* Draws the UI textbox to the frame buffer.
|
||||
*/
|
||||
void drawUITextbox();
|
||||
|
||||
/**
|
||||
* Draws the UI test menu to the frame buffer.
|
||||
*/
|
||||
void drawUITestMenu();
|
||||
void drawUITextbox();
|
Reference in New Issue
Block a user