Completed image caching technique for rendering text using the normal engine draw functions.

This commit is contained in:
2023-12-21 14:09:19 -06:00
parent 8581633cab
commit 5d1e0b5a7a
10 changed files with 150 additions and 428 deletions
+1 -1
View File
@@ -67,7 +67,7 @@ protected:
inline virtual void DrawDecal(ViewPort&window,bool focused)override{
MenuComponent::DrawDecal(window,focused);
vf2d adjustedScale={scale,scale};
vf2d labelTextSize=vf2d(game->GetWrappedTextSizeProp(label,rect.size.x,adjustedScale.x));
vf2d labelTextSize=vf2d(game->GetWrappedTextSizeProp(label,rect.size.x,adjustedScale));
if(fitToLabel){
float sizeRatio=((labelTextSize*adjustedScale).x)/(rect.size.x-2);