Correct memory leak in consuming items from inventory. Added overworld menu layout. Warrior Up walk animation has head bobbing like all the others now. Fixed alignment of items for ScrollableWindowComponents, fix scrollbar resizing when parent component has offsets.
This commit is contained in:
@@ -46,13 +46,13 @@ void MenuComponent::_Update(Crawler*game){
|
||||
|
||||
void MenuComponent::Draw(Crawler*game,vf2d parentPos){
|
||||
if(background){
|
||||
game->FillRect(rect.pos,rect.size,PixelLerp(Menu::themes[Menu::themeSelection].GetButtonCol(),Menu::themes[Menu::themeSelection].GetHighlightCol(),hoverEffect/"ThemeGlobal.HighlightTime"_F));
|
||||
game->FillRect(rect.pos+parentPos,rect.size,PixelLerp(Menu::themes[Menu::themeSelection].GetButtonCol(),Menu::themes[Menu::themeSelection].GetHighlightCol(),hoverEffect/"ThemeGlobal.HighlightTime"_F));
|
||||
}
|
||||
if(border){
|
||||
game->DrawRect(rect.pos,rect.size);
|
||||
game->DrawRect(rect.pos+parentPos,rect.size);
|
||||
}
|
||||
if(showDefaultLabel){
|
||||
game->DrawStringProp(rect.pos+rect.size/2-game->GetTextSizeProp(label)/2,label);
|
||||
game->DrawStringProp(rect.pos+parentPos+rect.size/2-game->GetTextSizeProp(label)/2,label);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user