Completed image caching technique for rendering text using the normal engine draw functions.
This commit is contained in:
+1
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user