Committing current progress.

This commit is contained in:
2021-08-19 11:18:56 -07:00
parent 41c460b90b
commit 7f80cb0fa0
10 changed files with 199 additions and 37 deletions

38
include/dawn/ui/menu.h Normal file
View File

@ -0,0 +1,38 @@
/**
* Copyright (c) 2021 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#pragma once
#include "../libs.h"
#define MENU_ITEMS_COLUMNS_MAX 16
#define MENU_ITEMS_ROWS_MAX 128
#define MENU_ITEMS_MAX MENU_ITEMS_COLUMNS_MAX * MENU_ITEMS_ROWS_MAX
#define MENU_DIRECTION_DOWN 0x01
#define MENU_DIRECTION_UP 0x02
#define MENU_DIRECTION_LEFT 0x03
#define MENU_DIRECTION_RIGHT 0x04
#define MENU_HOLD_DURATION 1.0
typedef struct {
int32_t bruh;
} menuitem_t;
typedef struct {
int32_t columns;
int32_t rows;
int32_t x;
int32_t y;
uint8_t direction;
menuitem_t* items[MENU_ITEMS_MAX];
bool holdAllow;
float holdLast;
} menu_t;