Files
draugnorak/src/inventory_menus.nvgt
T

46 lines
1.2 KiB
Plaintext

// Inventory and menu system orchestrator
// This file loads all menu subsystems in the correct dependency order
// Menu utilities (must be first - provides menu_background_tick used by all menus)
#include "menus/menu_utils.nvgt"
// Personal inventory
#include "menus/inventory_core.nvgt"
// Base storage
#include "menus/storage_menu.nvgt"
// Equipment management
#include "menus/equipment_menu.nvgt"
// Action menu (context-sensitive)
#include "menus/action_menu.nvgt"
// Character info display
#include "menus/character_info.nvgt"
// Base info display
#include "menus/base_info.nvgt"
// Altar/sacrifice menu
#include "menus/altar_menu.nvgt"
// Main key check functions (called from main game loop)
void check_inventory_keys(int x) {
if (key_pressed(KEY_P)) {
run_character_info_menu();
return;
}
if (key_pressed(KEY_I)) {
bool in_base = x <= BASE_END;
if (in_base && world_storages.length() > 0) {
run_inventory_root_menu();
} else {
if (in_base && world_storages.length() == 0) {
speak_with_history("No storage built.", true);
}
run_inventory_menu(false);
}
}
}