- if (titleBarText) titleBarTimer = GraphicsTimers().StartCountdown(850);
- if (moveAnimation.Valid()) moveAnimation.Start(*this);
+ if (titleBarText) {
+ titleBarTimer = GraphicsTimers().StartCountdown(850);
+ textPosition = battle->ScreenOffset() + Vector<int>(
+ (battle->Width() - std::strlen(titleBarText) * battle->Res().titleFont->CharWidth()) / 2,
+ battle->Res().titleFrame->BorderHeight());
+ }
+ if (moveAnimation.Valid()) {
+ moveAnimation.Start(*this);
+ if (battle->CurrentAttack().IsMonster()) {
+ battle->MonsterAt(battle->CurrentAttack().index).SetAnimation(moveAnimation);
+ } else if (battle->CurrentAttack().IsHero()) {
+ battle->HeroAt(battle->CurrentAttack().index).SetAnimation(moveAnimation);
+ } else {
+ battle->GetCapsule().SetAnimation(moveAnimation);
+ }
+ }