Render all background windows, foreground window is the only one with direct focus. Background windows are darkened.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user