26 lines
636 B
C
26 lines
636 B
C
/**
|
|
* Copyright (c) 2024 Dominic Masters
|
|
*
|
|
* This software is released under the MIT License.
|
|
* https://opensource.org/licenses/MIT
|
|
*/
|
|
|
|
#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
|
|
);
|
|
} |