Locked item display changes.

pull/28/head
sigonasr2 11 months ago
parent 9fef977a3a
commit f987e51324
  1. 4
      Crawler/ConsumableCraftingWindow.cpp
  2. 9
      Crawler/RowItemDisplay.h
  3. 2
      Crawler/Version.h

@ -62,7 +62,9 @@ void Menu::InitializeConsumableCraftingWindow(){
Component<MenuLabel>(CONSUMABLE_CRAFT_ITEM,"Item Name Header")->SetLabel(std::format("Crafting {}",item.lock()->DisplayName()));
Component<RequiredMaterialsList>(CONSUMABLE_CRAFT_ITEM,"Required Materials List")->SetItem(item);
Component<MenuComponent>(CONSUMABLE_CRAFT_ITEM,"Craft Button")->SetGrayedOut(!item.lock()->CanEnhanceItem());
Menu::OpenMenu(CONSUMABLE_CRAFT_ITEM);
if(item.lock()->GetEnhancementInfo().AvailableChapter()<=game->GetCurrentChapter()){
Menu::OpenMenu(CONSUMABLE_CRAFT_ITEM);
}
return true;
},
[](MenuFuncData data){

@ -77,11 +77,18 @@ public:
window.FillRectDecal(rect.pos+vf2d{1,1},rect.size-vf2d{1,1},col);
}
if(locked){
window.FillRectDecal(rect.pos+vf2d{1,1},rect.size-vf2d{1,1},BLACK);
}
float scaleFactor=(rect.size.y-4)/24;
vf2d iconSize=vf2d{scaleFactor,scaleFactor}*24.f;
Pixel tint=WHITE;
if(locked)tint=BLACK;
if(locked){
window.FillRectDecal(rect.pos+vf2d{2,2},iconSize);
tint=BLACK;
}
window.DrawDecal(rect.pos+vf2d{2,2},const_cast<Decal*>(itemRef.lock()->Decal()),{scaleFactor,scaleFactor},tint);
window.DrawRectDecal(rect.pos+vf2d{2,2},iconSize);

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 0
#define VERSION_MINOR 2
#define VERSION_PATCH 1
#define VERSION_BUILD 5077
#define VERSION_BUILD 5079
#define stringify(a) stringify_(a)
#define stringify_(a) #a

Loading…
Cancel
Save