parent
48a8165086
commit
fe6737117d
@ -0,0 +1,27 @@ |
||||
#pragma once |
||||
#include "Crawler.h" |
||||
#include "Menu.h" |
||||
#include "DEFINES.h" |
||||
#include "olcPixelGameEngine.h" |
||||
#include "safemap.h" |
||||
#include "Item.h" |
||||
|
||||
INCLUDE_GFX |
||||
typedef Attribute A; |
||||
|
||||
const Menu Menu::InitializeInventoryWindow(){ |
||||
constexpr int invWidth=5; |
||||
constexpr int invHeight=3; |
||||
constexpr int totalItemSlots=invWidth*invHeight; |
||||
|
||||
Menu inventoryWindow(CENTERED,{24*invWidth,24*(invHeight+1)}); |
||||
|
||||
for(auto&key:Inventory::get()){ |
||||
|
||||
} |
||||
for(int i=0;i<totalItemSlots;i++){ |
||||
inventoryWindow.GetStringVec(A::INDEXED_ITEMS).push_back(); |
||||
} |
||||
|
||||
return testSubMenu; |
||||
} |
@ -1,19 +0,0 @@ |
||||
#pragma once |
||||
#include "MenuIconButton.h" |
||||
#include "Item.h" |
||||
|
||||
INCLUDE_game |
||||
|
||||
class ItemComponent:public MenuIconButton{ |
||||
Item::ItemName item; |
||||
public: |
||||
inline ItemComponent(geom2d::rect<float>rect,Item::ItemName*item,MenuFunc onClick) |
||||
:MenuIconButton(rect,,onClick){} |
||||
protected: |
||||
virtual void inline Update(Crawler*game)override{ |
||||
MenuIconButton::Update(game); |
||||
} |
||||
virtual void inline Draw(Crawler*game,vf2d parentPos,bool focused)override{ |
||||
MenuIconButton::Draw(game,parentPos,focused); |
||||
} |
||||
}; |
@ -0,0 +1,23 @@ |
||||
#pragma once |
||||
#include "MenuIconButton.h" |
||||
#include "DEFINES.h" |
||||
#include "Crawler.h" |
||||
#include "Item.h" |
||||
|
||||
INCLUDE_game |
||||
|
||||
class MenuItemButton:public MenuIconButton{ |
||||
private: |
||||
Decal*icon; |
||||
public: |
||||
inline MenuItemButton(geom2d::rect<float>rect,Decal*icon,MenuFunc onClick) |
||||
:MenuIconButton(rect,icon,onClick){} |
||||
protected: |
||||
virtual void inline Update(Crawler*game)override{ |
||||
MenuComponent::Update(game); |
||||
} |
||||
virtual void inline Draw(Crawler*game,vf2d parentPos,bool focused)override{ |
||||
MenuComponent::Draw(game,parentPos,focused); |
||||
game->DrawRotatedDecal(parentPos+rect.middle(),icon,0,icon->sprite->Size()/2,{1,1},focused?WHITE:WHITE*"ThemeGlobal.MenuUnfocusedColorMult"_F); |
||||
} |
||||
}; |
Loading…
Reference in new issue