Skip to content

Commit

Permalink
Shift text in Surrender window (#7641)
Browse files Browse the repository at this point in the history
  • Loading branch information
ihhub authored Aug 26, 2023
1 parent 8e52bf2 commit 0df4b46
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/fheroes2/battle/battle_dialogs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,8 @@ bool Battle::DialogBattleSurrender( const HeroBase & hero, uint32_t cost, Kingdo
const Text text( str, Font::SMALL );
const fheroes2::Rect rect = btnAccept.area();

text.Blit( rect.x + ( rect.width - text.w() ) / 2, rect.y - 15 );
// Since button area includes 3D effect on the left side we need to shift the text by X axis to center it in relation to the button.
text.Blit( rect.x + ( rect.width - text.w() ) / 2 + 2, rect.y - 15 );
};

const int icn = isEvilInterface ? ICN::SURRENDE : ICN::SURRENDR;
Expand Down

0 comments on commit 0df4b46

Please sign in to comment.