Fix hover over label update bug inside character equip menu (thanks to a side effect of updating the item reference).

Applied random stats to equip stats. Made sure that rings that are the same in both equip slots do not cause the stats difference display from showing any actual differences. Prevent accidental unequipping of rings already equipped (if you technically were to swap between them)
This commit is contained in:
2023-12-31 18:05:41 -06:00
parent 4daf4f0135
commit 5a9396fbcb
6 changed files with 64 additions and 41 deletions
+4 -4
View File
@@ -82,14 +82,14 @@ protected:
vf2d(game->GetWrappedTextSize(label,rect.size.x,adjustedScale));
if(fitToLabel){
float sizeRatio=((labelTextSize*adjustedScale).x)/(rect.size.x-2);
if(sizeRatio>1){
adjustedScale.x/=sizeRatio;
}
labelTextSize=
proportional?
vf2d(game->GetTextSizeProp(label)*adjustedScale):
vf2d(game->GetTextSize(label)*adjustedScale);
float sizeRatio=((labelTextSize*adjustedScale).x)/(rect.size.x-2);
if(sizeRatio>1){
adjustedScale.x/=sizeRatio;
}
}
vf2d drawPos=rect.middle()-vf2d{labelTextSize}/2; //Assume centered.