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