2020-12-23 17:39:22 +01:00
|
|
|
#pragma once
|
|
|
|
#include <utils/types.h>
|
|
|
|
#include "../utils/vector.h"
|
|
|
|
|
|
|
|
typedef void (*menuEntriesGatherer)(Vector_t* vec, void* data);
|
|
|
|
typedef void (*menuPaths)();
|
|
|
|
|
|
|
|
typedef struct _menuEntry {
|
|
|
|
union {
|
|
|
|
struct {
|
|
|
|
u32 B:8;
|
|
|
|
u32 G:8;
|
|
|
|
u32 R:8;
|
|
|
|
u32 skip:1;
|
|
|
|
u32 hide:1;
|
|
|
|
};
|
|
|
|
u32 optionUnion;
|
|
|
|
};
|
|
|
|
char *name;
|
|
|
|
u8 icon;
|
|
|
|
union {
|
|
|
|
struct {
|
|
|
|
u16 size:12;
|
|
|
|
u16 showSize:1;
|
|
|
|
u16 sizeDef:3;
|
|
|
|
};
|
|
|
|
u16 sizeUnion;
|
|
|
|
};
|
|
|
|
} MenuEntry_t;
|
|
|
|
|
|
|
|
#define SKIPHIDEBITS 0x3000000
|
|
|
|
#define RGBCOLOR(r, g, b) (b << 16 | g << 8 | r)
|
|
|
|
|
2020-12-24 00:31:17 +01:00
|
|
|
#define SKIPBIT BIT(24)
|
|
|
|
#define HIDEBIT BIT(25)
|
|
|
|
|
|
|
|
#define ENABLEB BIT(0)
|
|
|
|
#define ENABLEPAGECOUNT BIT(1)
|
|
|
|
#define ALWAYSREDRAW BIT(2)
|
2020-12-25 21:16:24 +01:00
|
|
|
#define USELIGHTGREY BIT(3)
|
|
|
|
|
|
|
|
#define ScreenDefaultLenX 79
|
|
|
|
#define ScreenDefaultLenY 30
|
2020-12-24 00:31:17 +01:00
|
|
|
|
2020-12-24 17:06:21 +01:00
|
|
|
#define ARR_LEN(x) (sizeof(x) / sizeof(*x))
|
|
|
|
|
2021-01-21 17:59:49 +01:00
|
|
|
int newMenu(Vector_t* vec, int startIndex, int screenLenX, int screenLenY, u8 options, int entryCount);
|