pokemon/window/menu.hpp

36 lines
773 B
C++

#pragma once
#include "../coordinates.hpp"
#include "../trainer.hpp"
typedef uint8_t const * const menu_label_t;
struct menu_entry_t {
union {
menu_label_t * labels;
menu_label_t (* const label_func)(const uint32_t index,
const trainer_state_t& trainer);
};
};
struct menu_t {
enum entry_type {
labels,
func,
};
const screen_cell_t top_left; // in cells
const screen_cell_t bottom_right; // in cells
const uint8_t width; // in menu items
const uint8_t height; // in menu items
const uint8_t h_advance; // in cells
const uint8_t v_advance; // in cells
const enum entry_type entry_type;
const menu_entry_t entry;
};
extern const menu_t menu_start;
extern const menu_t menu_fight;
extern const menu_t menu_fight_moves;