mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-27 00:41:08 +02:00
Merge pull request #4780 from Laserlicht/text_pos_fix
fix: campaign video scrolling for short texts
This commit is contained in:
@ -60,7 +60,10 @@ CPrologEpilogVideo::CPrologEpilogVideo(CampaignScenarioPrologEpilog _spe, std::f
|
||||
CCS->soundh->setCallback(voiceSoundHandle, onVoiceStop);
|
||||
|
||||
text = std::make_shared<CMultiLineLabel>(Rect(100, 500, 600, 100), EFonts::FONT_BIG, ETextAlignment::CENTER, Colors::METALLIC_GOLD, spe.prologText.toString());
|
||||
text->scrollTextTo(-50); // beginning of text in the vertical middle of black area
|
||||
if(text->getLines().size() == 3)
|
||||
text->scrollTextTo(-25); // beginning of text in the vertical middle of black area
|
||||
else if(text->getLines().size() > 3)
|
||||
text->scrollTextTo(-50); // beginning of text in the vertical middle of black area
|
||||
}
|
||||
|
||||
void CPrologEpilogVideo::tick(uint32_t msPassed)
|
||||
|
Reference in New Issue
Block a user