Fix border display drawing for menus. Fix scrollable window components that went outside to use proper scrolling offsets. Fix issue with same-frame clicking and releasing causing a different button to be selected.
This commit is contained in:
@@ -131,13 +131,13 @@ protected:
|
||||
}
|
||||
}
|
||||
}
|
||||
virtual inline void DrawDecal(ViewPort&window,vf2d parentPos,bool focused)override{
|
||||
MenuIconButton::DrawDecal(window,parentPos,focused);
|
||||
virtual inline void DrawDecal(ViewPort&window,bool focused)override{
|
||||
MenuIconButton::DrawDecal(window,focused);
|
||||
if(valid&&!hideQty){
|
||||
std::string quantityText="x"+std::to_string(itemRef.get().Amt());
|
||||
vf2d quantityTextScale=rect.size/48.f;
|
||||
vf2d textSize=vf2d(game->GetTextSizeProp(quantityText))*quantityTextScale;
|
||||
vf2d drawPos=parentPos+rect.pos+rect.size-textSize;
|
||||
vf2d drawPos=rect.pos+rect.size-textSize;
|
||||
geom2d::rect<float>boundingBox={drawPos,textSize};
|
||||
window.DrawShadowStringDecal(drawPos,quantityText,WHITE,BLACK,quantityTextScale,quantityTextScale.x);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user