Traveling Merchant Purchase Window and systems implemented.

This commit is contained in:
2023-12-19 18:46:59 -06:00
parent 71fe49162d
commit eae8239501
19 changed files with 225 additions and 30 deletions
+12 -2
View File
@@ -102,7 +102,11 @@ void MenuComponent::OnEquipStatsUpdate(){}
void MenuComponent::DrawDecal(ViewPort&window,bool focused){
if(background){
window.FillRectDecal(rect.pos+V(A::DRAW_OFFSET),rect.size,PixelLerp(Menu::themes[Menu::themeSelection].GetButtonCol(),Menu::themes[Menu::themeSelection].GetHighlightCol(),hoverEffect/"ThemeGlobal.HighlightTime"_F));
Pixel backCol=PixelLerp(Menu::themes[Menu::themeSelection].GetButtonCol(),Menu::themes[Menu::themeSelection].GetHighlightCol(),hoverEffect/"ThemeGlobal.HighlightTime"_F);
if(grayedOut){
backCol=DARK_GREY;
}
window.FillRectDecal(rect.pos+V(A::DRAW_OFFSET),rect.size,backCol);
}
if(selected&&selectionType==HIGHLIGHT){
window.FillRectDecal(rect.pos+V(A::DRAW_OFFSET),rect.size,PixelLerp(Menu::themes[Menu::themeSelection].GetButtonCol(),Menu::themes[Menu::themeSelection].GetHighlightCol(),util::lerp(0.75f,1.0f,hoverEffect/"ThemeGlobal.HighlightTime"_F)));
@@ -240,4 +244,10 @@ void MenuComponent::SetHoverFunc(std::function<bool(MenuFuncData)>func){
void MenuComponent::SetMouseOutFunc(std::function<bool(MenuFuncData)>func){
runHoverFunctions=true;
onMouseOut=func;
};
};
void MenuComponent::SetGrayedOut(bool grayedOut){
this->grayedOut=grayedOut;
}
void MenuComponent::OnPlayerMoneyUpdate(uint32_t newMoney){}