|
|
|
@ -45,16 +45,20 @@ void MenuComponent::_Update(Crawler*game){ |
|
|
|
|
|
|
|
|
|
void MenuComponent::Draw(Crawler*game,vf2d parentPos){ |
|
|
|
|
if(background){ |
|
|
|
|
game->FillRect(rect.pos+parentPos,rect.size,PixelLerp(Menu::themes[Menu::themeSelection].GetButtonCol(),Menu::themes[Menu::themeSelection].GetHighlightCol(),hoverEffect/"ThemeGlobal.HighlightTime"_F)); |
|
|
|
|
game->FillRect(rect.pos,rect.size,PixelLerp(Menu::themes[Menu::themeSelection].GetButtonCol(),Menu::themes[Menu::themeSelection].GetHighlightCol(),hoverEffect/"ThemeGlobal.HighlightTime"_F)); |
|
|
|
|
} |
|
|
|
|
if(border){ |
|
|
|
|
game->DrawRect(rect.pos+parentPos,rect.size); |
|
|
|
|
game->DrawRect(rect.pos,rect.size); |
|
|
|
|
} |
|
|
|
|
if(showDefaultLabel){ |
|
|
|
|
game->DrawStringProp(rect.pos+parentPos+rect.size/2-game->GetTextSizeProp(label)/2,label); |
|
|
|
|
game->DrawStringProp(rect.pos+rect.size/2-game->GetTextSizeProp(label)/2,label); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void MenuComponent::_Draw(Crawler*game){ |
|
|
|
|
_Draw(game,{0,0}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void MenuComponent::_Draw(Crawler*game,vf2d parentPos){ |
|
|
|
|
if(!disabled){ |
|
|
|
|
Draw(game,parentPos); |
|
|
|
@ -63,6 +67,10 @@ void MenuComponent::_Draw(Crawler*game,vf2d parentPos){ |
|
|
|
|
|
|
|
|
|
void MenuComponent::DrawDecal(Crawler*game,vf2d parentPos,bool focused){} |
|
|
|
|
|
|
|
|
|
void MenuComponent::_DrawDecal(Crawler*game,bool focused){ |
|
|
|
|
_DrawDecal(game,{0,0},focused); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void MenuComponent::_DrawDecal(Crawler*game,vf2d parentPos,bool focused){ |
|
|
|
|
if(!disabled){ |
|
|
|
|
DrawDecal(game,parentPos,focused); |
|
|
|
|