- fixed some floating point truncation warnings.

This commit is contained in:
Christoph Oelckers 2020-10-17 09:09:59 +02:00
parent 824d4bd9e3
commit 34c3a851b7
2 changed files with 5 additions and 4 deletions

View file

@ -129,7 +129,7 @@ class LoadSaveMenu : ListMenu
double wScale = Width43 / 640.;
savepicLeft = Left43 + int(20 * wScale);
savepicTop = mDesc.mYpos * screen.GetHeight() / 200 ;
savepicTop = int(mDesc.mYpos * screen.GetHeight() / 200);
savepicWidth = int(240 * wScale);
savepicHeight = int(180 * wScale);

View file

@ -89,7 +89,7 @@ class MessageBoxMenu : Menu
int mr2 = destWidth/2 + 10 + textFont.StringWidth(Stringtable.Localize("$TXT_NO"));
mMouseRight = MAX(mr1, mr2);
mParentMenu = parent;
mMessage = textFont.BreakLines(Stringtable.Localize(message), 300/NotifyFontScale);
mMessage = textFont.BreakLines(Stringtable.Localize(message), int(300/NotifyFontScale));
mMessageMode = messagemode;
if (playsound)
{
@ -106,8 +106,9 @@ class MessageBoxMenu : Menu
override void Drawer ()
{
int i, y;
int fontheight = textFont.GetHeight() * NotifyFontScale;
int i;
double y;
let fontheight = textFont.GetHeight() * NotifyFontScale;
y = destHeight / 2;