mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
fix
This commit is contained in:
@@ -25,7 +25,7 @@ CPrologEpilogVideo::CPrologEpilogVideo(CampaignScenarioPrologEpilog _spe, std::f
|
|||||||
: CWindowObject(BORDERED), spe(_spe), positionCounter(0), voiceSoundHandle(-1), videoSoundHandle(-1), exitCb(callback), elapsedTimeMilliseconds(0)
|
: CWindowObject(BORDERED), spe(_spe), positionCounter(0), voiceSoundHandle(-1), videoSoundHandle(-1), exitCb(callback), elapsedTimeMilliseconds(0)
|
||||||
{
|
{
|
||||||
OBJ_CONSTRUCTION_CAPTURING_ALL_NO_DISPOSE;
|
OBJ_CONSTRUCTION_CAPTURING_ALL_NO_DISPOSE;
|
||||||
addUsedEvents(LCLICK);
|
addUsedEvents(LCLICK | TIME);
|
||||||
pos = center(Rect(0, 0, 800, 600));
|
pos = center(Rect(0, 0, 800, 600));
|
||||||
updateShadow();
|
updateShadow();
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@ void CPrologEpilogVideo::show(Canvas & to)
|
|||||||
//some videos are 800x600 in size while some are 800x400
|
//some videos are 800x600 in size while some are 800x400
|
||||||
CCS->videoh->update(pos.x, pos.y + (CCS->videoh->size().y == 400 ? 100 : 0), to.getInternalSurface(), true, false);
|
CCS->videoh->update(pos.x, pos.y + (CCS->videoh->size().y == 400 ? 100 : 0), to.getInternalSurface(), true, false);
|
||||||
|
|
||||||
const double speed = (voiceDurationMilliseconds == 0) ? 100 : (voiceDurationMilliseconds / (text->textSize.y));
|
const uint32_t speed = (voiceDurationMilliseconds == 0) ? 100 : (voiceDurationMilliseconds / (text->textSize.y));
|
||||||
|
|
||||||
if(elapsedTimeMilliseconds > speed && text->textSize.y - 50 > positionCounter)
|
if(elapsedTimeMilliseconds > speed && text->textSize.y - 50 > positionCounter)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user