|
|
|
@ -254,16 +254,6 @@ namespace MWGui
|
|
|
|
|
if (plainText.size() && brAtEnd)
|
|
|
|
|
plainText.erase(plainText.end()-1);
|
|
|
|
|
|
|
|
|
|
#if (MYGUI_VERSION < MYGUI_DEFINE_VERSION(3, 2, 2))
|
|
|
|
|
// splitting won't be fully functional until 3.2.2 (see TextElement::pageSplit())
|
|
|
|
|
// hack: prevent newlines at the end of the book possibly creating unnecessary pages
|
|
|
|
|
if (event == BookTextParser::Event_EOF)
|
|
|
|
|
{
|
|
|
|
|
while (plainText.size() && plainText[plainText.size()-1] == '\n')
|
|
|
|
|
plainText.erase(plainText.end()-1);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
if (!plainText.empty() || brBeforeLastTag || isPrevImg)
|
|
|
|
|
{
|
|
|
|
|
TextElement elem(paper, pag, mBlockStyle,
|
|
|
|
@ -443,8 +433,6 @@ namespace MWGui
|
|
|
|
|
int ret = mPaginator.getCurrentTop() + lastLine * lineHeight;
|
|
|
|
|
|
|
|
|
|
// first empty lines that would go to the next page should be ignored
|
|
|
|
|
// unfortunately, getLineInfo method won't be available until 3.2.2
|
|
|
|
|
#if (MYGUI_VERSION >= MYGUI_DEFINE_VERSION(3, 2, 2))
|
|
|
|
|
mPaginator.setIgnoreLeadingEmptyLines(true);
|
|
|
|
|
|
|
|
|
|
const MyGUI::VectorLineInfo & lines = mEditBox->getSubWidgetText()->castType<MyGUI::EditText>()->getLineInfo();
|
|
|
|
@ -458,7 +446,6 @@ namespace MWGui
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
return ret;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|