Fixed inventory window display bugs using old parent position code for rendering.
This commit is contained in:
@@ -122,11 +122,11 @@ protected:
|
||||
|
||||
virtual inline void DrawDecal(Crawler*game,vf2d parentPos,bool focused)override{
|
||||
MenuComponent::DrawDecal(game,parentPos,focused);
|
||||
game->DrawRectDecal(rect.pos+parentPos,rect.size);
|
||||
game->DrawRectDecal(rect.pos+Menu::menus[parentMenu]->pos,rect.size);
|
||||
for(MenuComponent*component:components){
|
||||
component->_DrawDecal(game,rect.pos+parentPos+V(A::SCROLL_OFFSET),focused);
|
||||
component->_DrawDecal(game,rect.pos+Menu::menus[parentMenu]->pos+V(A::SCROLL_OFFSET),focused);
|
||||
}
|
||||
DrawScrollbar(game,parentPos,focused);
|
||||
DrawScrollbar(game,Menu::menus[parentMenu]->pos,focused);
|
||||
}
|
||||
virtual bool GetHoverState(Crawler*game,MenuComponent*child)override{
|
||||
return geom2d::overlaps(geom2d::rect<float>{Menu::menus[parentMenu]->pos+rect.pos+child->rect.pos+V(A::SCROLL_OFFSET),child->rect.size},game->GetMousePos());
|
||||
|
||||
Reference in New Issue
Block a user