Fix message box formatting bug

actorid
scrawl 11 years ago
parent 7907181c0c
commit 0cc1cd8f7e

@ -245,11 +245,11 @@ namespace MWGui
} }
mainWidgetSize.height = textSize.height + textButtonPadding + buttonHeight + buttonMainPadding; mainWidgetSize.height = textSize.height + textButtonPadding + buttonHeight + buttonMainPadding;
MyGUI::IntCoord absCoord; MyGUI::IntPoint absPos;
absCoord.left = (gameWindowSize.width - mainWidgetSize.width)/2; absPos.left = (gameWindowSize.width - mainWidgetSize.width)/2;
absCoord.top = (gameWindowSize.height - mainWidgetSize.height)/2; absPos.top = (gameWindowSize.height - mainWidgetSize.height)/2;
mMainWidget->setCoord(absCoord); mMainWidget->setPosition(absPos);
mMainWidget->setSize(mainWidgetSize); mMainWidget->setSize(mainWidgetSize);
MyGUI::IntCoord messageWidgetCoord; MyGUI::IntCoord messageWidgetCoord;

@ -48,9 +48,10 @@ namespace Interpreter
} }
else if (c=='f' || c=='F' || c=='.') else if (c=='f' || c=='F' || c=='.')
{ {
while (c!='f' && i<message.size()) while (c!='f' && i+1<message.size())
{ {
++i; ++i;
c = message[i];
} }
float value = runtime[0].mFloat; float value = runtime[0].mFloat;

Loading…
Cancel
Save