Skip to content

Commit a7eda56

Browse files
a1exshKazhuu
authored andcommitted
Fix too wide text in quick hero info box (ihhub#8175)
1 parent 8a84ee7 commit a7eda56

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/fheroes2/dialog/dialog_quickinfo.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -840,6 +840,7 @@ namespace
840840
text.set( _( "Attack:" ), smallWhite );
841841
dst_pt.x = cur_rt.x + 10;
842842
dst_pt.y += heroPortraitFrame.height();
843+
text.fitToOneRow( statNumberColumn );
843844
text.draw( dst_pt.x, dst_pt.y, display );
844845

845846
text.set( std::to_string( hero.GetAttack() ), smallWhite );
@@ -850,6 +851,7 @@ namespace
850851
text.set( _( "Defense:" ), smallWhite );
851852
dst_pt.x = cur_rt.x + 10;
852853
dst_pt.y += statRow;
854+
text.fitToOneRow( statNumberColumn );
853855
text.draw( dst_pt.x, dst_pt.y, display );
854856

855857
text.set( std::to_string( hero.GetDefense() ), smallWhite );
@@ -860,6 +862,7 @@ namespace
860862
text.set( _( "Spell Power:" ), smallWhite );
861863
dst_pt.x = cur_rt.x + 10;
862864
dst_pt.y += statRow;
865+
text.fitToOneRow( statNumberColumn );
863866
text.draw( dst_pt.x, dst_pt.y, display );
864867

865868
text.set( std::to_string( hero.GetPower() ), smallWhite );
@@ -870,6 +873,7 @@ namespace
870873
text.set( _( "Knowledge:" ), smallWhite );
871874
dst_pt.x = cur_rt.x + 10;
872875
dst_pt.y += statRow;
876+
text.fitToOneRow( statNumberColumn );
873877
text.draw( dst_pt.x, dst_pt.y, display );
874878

875879
text.set( std::to_string( hero.GetKnowledge() ), smallWhite );
@@ -880,6 +884,7 @@ namespace
880884
text.set( _( "Spell Points:" ), smallWhite );
881885
dst_pt.x = cur_rt.x + 10;
882886
dst_pt.y += statRow;
887+
text.fitToOneRow( statNumberColumn );
883888
text.draw( dst_pt.x, dst_pt.y, display );
884889

885890
text.set( std::to_string( hero.GetSpellPoints() ) + "/" + std::to_string( hero.GetMaxSpellPoints() ), smallWhite );
@@ -891,6 +896,7 @@ namespace
891896
text.set( _( "Move Points:" ), smallWhite );
892897
dst_pt.x = cur_rt.x + 10;
893898
dst_pt.y += statRow;
899+
text.fitToOneRow( statNumberColumn );
894900
text.draw( dst_pt.x, dst_pt.y, display );
895901

896902
text.set( std::to_string( activeHero->GetMovePoints() ) + "/" + std::to_string( activeHero->GetMaxMovePoints() ), smallWhite );

0 commit comments

Comments
 (0)