Fix overlapping sub-component mouse hover bug, populate blacksmith weapon and armor lists with player's equipment.
This commit is contained in:
@@ -204,7 +204,8 @@ protected:
|
||||
DrawScrollbar(window,{},focused);
|
||||
}
|
||||
virtual bool GetHoverState(Crawler*game,MenuComponent*child)override{
|
||||
return geom2d::overlaps(geom2d::rect<float>{Menu::menus[parentMenu]->pos+rect.pos+child->rect.pos,child->rect.size},game->GetMousePos());
|
||||
return geom2d::overlaps(geom2d::rect<float>{Menu::menus[parentMenu]->pos+rect.pos,rect.size},game->GetMousePos())&& //Make sure the mouse is inside the parent window component first....
|
||||
geom2d::overlaps(geom2d::rect<float>{Menu::menus[parentMenu]->pos+rect.pos+child->rect.pos,child->rect.size},game->GetMousePos());
|
||||
}
|
||||
//Calculates the bounds of all components.
|
||||
inline void CalculateBounds(){
|
||||
|
||||
Reference in New Issue
Block a user