Render all background windows, foreground window is the only one with direct focus. Background windows are darkened.

This commit is contained in:
2023-10-05 00:42:28 -05:00
parent d70297578c
commit d3f26d4bb0
9 changed files with 50 additions and 34 deletions
+4 -4
View File
@@ -15,10 +15,10 @@ void MenuComponent::Update(Crawler*game){
}
}
void MenuComponent::Draw(Crawler*game,vf2d parentPos){
game->FillRectDecal(rect.pos+parentPos,rect.size,PixelLerp(Menu::themes[Menu::themeSelection].GetButtonCol(),Menu::themes[Menu::themeSelection].GetHighlightCol(),hoverEffect/"ThemeGlobal.HighlightTime"_F));
void MenuComponent::Draw(Crawler*game,vf2d parentPos,bool focused){
game->FillRectDecal(rect.pos+parentPos,rect.size,PixelLerp(Menu::themes[Menu::themeSelection].GetButtonCol(),Menu::themes[Menu::themeSelection].GetHighlightCol(),hoverEffect/"ThemeGlobal.HighlightTime"_F)*(focused?1:"ThemeGlobal.MenuUnfocusedColorMult"_F));
if(border){
game->DrawRectDecal(rect.pos+parentPos,rect.size,GREY);
game->DrawRectDecal(rect.pos+parentPos,rect.size,focused?GREY:GREY*"ThemeGlobal.MenuUnfocusedColorMult"_F);
}
game->DrawStringPropDecal(rect.pos+parentPos+rect.size/2-game->GetTextSizeProp(label)/2,label);
game->DrawStringPropDecal(rect.pos+parentPos+rect.size/2-game->GetTextSizeProp(label)/2,label,focused?WHITE:WHITE*"ThemeGlobal.MenuUnfocusedColorMult"_F);
}