Typo on Accessories. Initialize listener categories
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
parent
46462a24e7
commit
1f40e846ac
@ -1,4 +1,3 @@
|
|||||||
#pragma once
|
|
||||||
#include "Item.h"
|
#include "Item.h"
|
||||||
#include "safemap.h"
|
#include "safemap.h"
|
||||||
#include "DEFINES.h"
|
#include "DEFINES.h"
|
||||||
@ -26,6 +25,7 @@ void ItemInfo::InitializeItems(){
|
|||||||
for(auto&key:DATA["ItemCategory"].GetKeys()){
|
for(auto&key:DATA["ItemCategory"].GetKeys()){
|
||||||
ITEM_CATEGORIES[key.first];
|
ITEM_CATEGORIES[key.first];
|
||||||
Inventory::sortedInv[key.first];
|
Inventory::sortedInv[key.first];
|
||||||
|
Menu::inventoryListeners[key.first];
|
||||||
}
|
}
|
||||||
|
|
||||||
for(auto&key:DATA["ItemDatabase"].GetKeys()){
|
for(auto&key:DATA["ItemDatabase"].GetKeys()){
|
||||||
@ -75,6 +75,7 @@ void ItemInfo::InitializeItems(){
|
|||||||
|
|
||||||
ITEM_DATA.SetInitialized();
|
ITEM_DATA.SetInitialized();
|
||||||
ITEM_CATEGORIES.SetInitialized();
|
ITEM_CATEGORIES.SetInitialized();
|
||||||
|
Menu::inventoryListeners.SetInitialized();
|
||||||
|
|
||||||
std::cout<<ITEM_DATA.size()<<" items have been loaded."<<std::endl;
|
std::cout<<ITEM_DATA.size()<<" items have been loaded."<<std::endl;
|
||||||
std::cout<<ITEM_CATEGORIES.size()<<" item categories have been loaded."<<std::endl;
|
std::cout<<ITEM_CATEGORIES.size()<<" item categories have been loaded."<<std::endl;
|
||||||
|
@ -11,6 +11,7 @@ std::vector<Menu*>Menu::stack;
|
|||||||
std::map<MenuType,Menu*>Menu::menus;
|
std::map<MenuType,Menu*>Menu::menus;
|
||||||
std::string Menu::themeSelection="BlueDefault";
|
std::string Menu::themeSelection="BlueDefault";
|
||||||
safeunorderedmap<std::string,Theme>Menu::themes;
|
safeunorderedmap<std::string,Theme>Menu::themes;
|
||||||
|
safemap<ITCategory,std::vector<MenuComponent*>>Menu::inventoryListeners;
|
||||||
const vf2d Menu::CENTERED = {-456,-456};
|
const vf2d Menu::CENTERED = {-456,-456};
|
||||||
|
|
||||||
INCLUDE_GFX
|
INCLUDE_GFX
|
||||||
|
@ -22,6 +22,7 @@ enum MenuType{
|
|||||||
class Menu:IAttributable{
|
class Menu:IAttributable{
|
||||||
friend class Crawler;
|
friend class Crawler;
|
||||||
friend class Player;
|
friend class Player;
|
||||||
|
friend class ItemInfo;
|
||||||
|
|
||||||
float buttonHoldTime=0;
|
float buttonHoldTime=0;
|
||||||
std::vector<MenuComponent*>displayComponents; //Comp.onents that are only for displaying purposes.
|
std::vector<MenuComponent*>displayComponents; //Comp.onents that are only for displaying purposes.
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "Menu.h"
|
#include "Menu.h"
|
||||||
#include "MenuComponent.h"
|
#include "MenuComponent.h"
|
||||||
|
#include "MenuItemButton.h"
|
||||||
#include "Crawler.h"
|
#include "Crawler.h"
|
||||||
|
|
||||||
typedef Attribute A;
|
typedef Attribute A;
|
||||||
|
@ -3,6 +3,6 @@ ItemCategory
|
|||||||
# Random side note, these descriptions aren't used anywhere in-game atm.
|
# Random side note, these descriptions aren't used anywhere in-game atm.
|
||||||
Consumables = Items that will be consumed after a single use.
|
Consumables = Items that will be consumed after a single use.
|
||||||
Equipment = Gear that can be placed onto a player.
|
Equipment = Gear that can be placed onto a player.
|
||||||
Accesories = Items worn as extra items on the player.
|
Accessories = Items worn as extra items on the player.
|
||||||
Materials = Items used as crafting materials for the forge.
|
Materials = Items used as crafting materials for the forge.
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user