Skip to content

Commit

Permalink
Add hotkeys, expand description
Browse files Browse the repository at this point in the history
description improvements
  • Loading branch information
zenseii committed Jan 13, 2025
1 parent 560c352 commit 4bc6e70
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/fheroes2/battle/battle_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2878,7 +2878,7 @@ void Battle::Interface::HumanBattleTurn( const Unit & unit, Actions & actions, s
OpenAutoModeDialog( unit, actions );
}
else if ( le.isMouseRightButtonPressed() ) {
fheroes2::showStandardTextMessage( _( "Automatic Battle" ), _( "Choose between solving the battle through Auto Combat or Auto Resolve." ), Dialog::ZERO );
fheroes2::showStandardTextMessage( _( "Automatic Battle" ), _( "Choose whether to fight out the battle through Auto Combat or Auto Resolve." ), Dialog::ZERO );
}
}
else if ( le.isMouseCursorPosInArea( _buttonSettings.area() ) ) {
Expand Down Expand Up @@ -3276,10 +3276,10 @@ void Battle::Interface::OpenAutoModeDialog( const Unit & unit, Actions & actions
if ( le.MouseClickLeft( buttonCancel.area() ) || Game::HotKeyPressEvent( Game::HotKeyEvent::DEFAULT_CANCEL ) ) {
return;
}
if ( le.MouseClickLeft( buttonAutoCombat.area() ) ) {
if ( le.MouseClickLeft( buttonAutoCombat.area() ) || Game::HotKeyPressEvent( Game::HotKeyEvent::BATTLE_AUTO_SWITCH ) ) {
EventStartAutoBattle( unit, actions );
}
else if ( le.MouseClickLeft( buttonAutoResolve.area() ) ) {
else if ( le.MouseClickLeft( buttonAutoResolve.area() ) || Game::HotKeyPressEvent( Game::HotKeyEvent::BATTLE_AUTO_FINISH ) ) {
EventAutoFinish( actions );
}
if ( !actions.empty() ) {
Expand All @@ -3292,7 +3292,7 @@ void Battle::Interface::OpenAutoModeDialog( const Unit & unit, Actions & actions
else if ( le.isMouseRightButtonPressedInArea( buttonAutoCombat.area() ) ) {
std::string msg = _( "Allows the computer to fight out the battle for you." );
msg += "\n\n";
msg += _( "autoCombat|This can be interrupted at any time by pressing the Auto Combat hotkey, or by a right- or left-click." );
msg += _( "autoCombat|This can be interrupted at any point by either pressing the Auto Combat hotkey or the default cancel key, or by right- or left-clicking anywhere." );
fheroes2::showStandardTextMessage( _( "Auto Combat" ), msg, Dialog::ZERO );
}
else if ( le.isMouseRightButtonPressedInArea( buttonAutoResolve.area() ) ) {
Expand Down
2 changes: 1 addition & 1 deletion src/fheroes2/gui/ui_button.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ namespace fheroes2
const int32_t textHeight = releasedText.height( textAreaWidth );
assert( textHeight > 0 );

// Add extra y margin for multilined texts on normal buttons
// Add extra y-margin for multi-lined texts on normal buttons.
if ( ( emptyButtonIcnID == ICN::EMPTY_EVIL_BUTTON || emptyButtonIcnID == ICN::EMPTY_GOOD_BUTTON ) && textHeight > 17 ) {
textAreaMargins.y += 16;
}
Expand Down

0 comments on commit 4bc6e70

Please sign in to comment.