56 lines
1.7 KiB
C
56 lines
1.7 KiB
C
#include "menu.h"
|
|
|
|
int menu_count = 0;
|
|
|
|
int menu_items [MENU_LIMIT];
|
|
int menu_show [MENU_LIMIT];
|
|
int menu_alpha [MENU_LIMIT];
|
|
|
|
char * menu_text [MENU_LIMIT] [MINIMENU_LIMIT];
|
|
int menu_icon [MENU_LIMIT] [MINIMENU_LIMIT];
|
|
void (* menu_action [MENU_LIMIT] [MINIMENU_LIMIT]) (void);
|
|
|
|
static void define_minimenu (int menu, char * text, int icon, void (* action) (void)) {
|
|
menu_text [menu] [menu_items [menu]] = text;
|
|
menu_icon [menu] [menu_items [menu]] = icon;
|
|
menu_action [menu] [menu_items [menu]] = action;
|
|
|
|
menu_items [menu]++;
|
|
}
|
|
|
|
static void define_menu (int alpha) {
|
|
menu_items [menu_count] = 0;
|
|
menu_show [menu_count] = 0;
|
|
menu_alpha [menu_count] = alpha;
|
|
|
|
menu_count++;
|
|
}
|
|
|
|
void menu_configure (void) {
|
|
int index;
|
|
|
|
define_menu (0);
|
|
define_menu (0);
|
|
define_menu (0);
|
|
define_menu (0);
|
|
|
|
for (index = 0; index < trait_count; ++index) {
|
|
define_minimenu (menu_traits, trait_name [index], index, 0);
|
|
}
|
|
|
|
for (index = 0; index < skill_count; ++index) {
|
|
define_minimenu (menu_skills, skill_name [index], 3 + index, 0);
|
|
}
|
|
|
|
for (index = 0; index < value_count; ++index) {
|
|
define_minimenu (menu_values, value_name [index], 27 + index, 0);
|
|
}
|
|
|
|
define_minimenu (menu_resources, "This is some simple neon menu...", 1, 0);
|
|
define_minimenu (menu_resources, "And to test dimension computation...", 1, 0);
|
|
define_minimenu (menu_resources, "We have different line lengths.", 1, 0);
|
|
define_minimenu (menu_resources, "I really don't know what else to write here.", 1, 0);
|
|
define_minimenu (menu_resources, "Important thing is how it looks when done.", 1, 0);
|
|
define_minimenu (menu_resources, "And I want HoM&M4 look and feel.", 1, 0);
|
|
}
|