Working on redoing menu ui.

This commit is contained in:
2021-09-07 21:56:22 -07:00
parent cac7ed3b0b
commit f19ec89aba
9 changed files with 176 additions and 13 deletions

View File

@ -71,6 +71,7 @@
// User Interface Objects
#include "ui/grid.h"
#include "ui/menuv2.h"
#include "ui/frame.h"
#include "ui/image.h"

View File

@ -56,6 +56,7 @@ typedef struct {
gridbreakpoint_t breakpoints[GRID_BREAKPOINT_COUNT];
breakpointsize_t breakpointSizes[GRID_BREAKPOINT_COUNT];
uint8_t breakpointCount;
uint8_t breakpointCurrent;
/** Child items of the grid */
gridchild_t children[GRID_CHILD_COUNT];

22
include/dawn/ui/menuv2.h Normal file
View File

@ -0,0 +1,22 @@
/**
* Copyright (c) 2021 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#pragma once
#include "../libs.h"
/** Generic callback for menu events */
typedef void menuv2callback_t(void *user, uint8_t i);
/** Structure for a menu */
typedef struct {
grid_t grid;
uint8_t selected;
uint8_t cursorX;
uint8_t cursorY;
void *user;
menuv2callback_t *onSelect;
} menuv2_t;