@@ -166,13 +166,13 @@ public void Draw(string text)
166
166
Rect rect = Rectangle ;
167
167
if ( rect . xMax > Screen . width )
168
168
{
169
- float difference = ( rect . xMax - Screen . width ) * 1f / LocalScale . x * textScale ;
169
+ float difference = ( rect . xMax - Screen . width ) * 1f / LocalScale . x ;
170
170
Vector2 newPosition = new Vector2 ( Position . x - difference , Position . y ) ;
171
171
Position = newPosition ;
172
172
}
173
173
if ( rect . yMax > Screen . height )
174
174
{
175
- float difference = ( rect . yMax - Screen . height ) * 1f / LocalScale . y * textScale ;
175
+ float difference = ( rect . yMax - Screen . height ) * 1f / LocalScale . y ;
176
176
Vector2 newPosition = new Vector2 ( Position . x , Position . y - difference ) ;
177
177
Position = newPosition ;
178
178
}
@@ -202,8 +202,8 @@ public override void Draw()
202
202
// Determine text position
203
203
Rect rect = Rectangle ;
204
204
Vector2 textPos = new Vector2 (
205
- rect . x + LeftMargin * ( LocalScale . x * textScale ) ,
206
- rect . y + TopMargin * ( LocalScale . y * textScale )
205
+ rect . x + LeftMargin * LocalScale . x ,
206
+ rect . y + TopMargin * LocalScale . y
207
207
) ;
208
208
209
209
//if (rect.xMax > Screen.width) textPos.x -= (rect.xMax - Screen.width);
@@ -257,7 +257,7 @@ void UpdateTextRows(string text)
257
257
widestRow = 0 ;
258
258
for ( int i = 0 ; i < textRows . Length ; i ++ )
259
259
{
260
- float width = font . CalculateTextWidth ( textRows [ i ] , LocalScale * textScale ) ;
260
+ float width = font . CalculateTextWidth ( textRows [ i ] , LocalScale ) ;
261
261
if ( width > widestRow )
262
262
widestRow = width ;
263
263
}
0 commit comments