- fixed warnings in image scroller core script

Script warning, "gzdoom.pk3:zscript/ui/menu/imagescroller.zs" line 113:
Truncation of floating point value
Script warning, "gzdoom.pk3:zscript/ui/menu/imagescroller.zs" line 122:
Truncation of floating point value
This commit is contained in:
alexey.lysiuk 2020-10-30 14:55:31 +02:00
parent 08302146d7
commit 46b980c213

View file

@ -110,7 +110,7 @@ class ImageScrollerPageTextItem : ImageScrollerPage
virtWidth = desc.virtWidth; virtWidth = desc.virtWidth;
virtHeight = desc.virtHeight; virtHeight = desc.virtHeight;
mText = mFont.BreakLines(Stringtable.Localize(txt.Filter()), virtWidth / mTextScale); mText = mFont.BreakLines(Stringtable.Localize(txt.Filter()), int(virtWidth / mTextScale));
mYpos = y >= 0? y : virtHeight / 2 - mText.Count() * mFont.GetHeight() * mTextScale / 2; mYpos = y >= 0? y : virtHeight / 2 - mText.Count() * mFont.GetHeight() * mTextScale / 2;
} }
@ -119,7 +119,7 @@ class ImageScrollerPageTextItem : ImageScrollerPage
{ {
Screen.DrawTexture(mTexture, true, 0, 0, DTA_FullscreenEx, FSMode_ScaleToFit43, DTA_LegacyRenderStyle, STYLE_Normal, DTA_Color, mBrightness); Screen.DrawTexture(mTexture, true, 0, 0, DTA_FullscreenEx, FSMode_ScaleToFit43, DTA_LegacyRenderStyle, STYLE_Normal, DTA_Color, mBrightness);
int fontheight = mFont.GetHeight() * mTextScale; let fontheight = mFont.GetHeight() * mTextScale;
let y = mYpos; let y = mYpos;
let c = mText.Count(); let c = mText.Count();
for (int i = 0; i < c; i++) for (int i = 0; i < c; i++)