Skip to content

Commit

Permalink
Add popup messages for right clicking on special map conditions
Browse files Browse the repository at this point in the history
relates to #8717
  • Loading branch information
ihhub committed Jun 29, 2024
1 parent 84dbbca commit 97055c9
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/fheroes2/editor/editor_map_specs_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,14 @@ namespace
_isClicked = true;
}

void ActionListPressRight( uint8_t & /* item */ ) override
void ActionListPressRight( uint8_t & condition ) override
{
// Do nothing.
if ( _isLossList ) {
fheroes2::showStandardTextMessage( _( "Special Loss Condition" ), getLossConditionText( condition ), Dialog::ZERO );
}
else {
fheroes2::showStandardTextMessage( _( "Special Victory Condition" ), getVictoryConditionText( condition ), Dialog::ZERO );
}
}

fheroes2::Rect getArea() const
Expand Down Expand Up @@ -1021,6 +1026,12 @@ namespace Editor
else if ( le.isMouseRightButtonPressedInArea( descriptionTextRoi ) ) {
fheroes2::showStandardTextMessage( _( "Map Description" ), _( "Click to change the description of the current map." ), Dialog::ZERO );
}
else if ( le.isMouseRightButtonPressedInArea( victoryDroplistButtonRoi ) ) {
fheroes2::showStandardTextMessage( _( "Special Victory Condition" ), _( "Click to change victory condition of the current map." ), Dialog::ZERO );
}
else if ( le.isMouseRightButtonPressedInArea( lossDroplistButtonRoi ) ) {
fheroes2::showStandardTextMessage( _( "Special Loss Condition" ), _( "Click to change loss condition of the current map." ), Dialog::ZERO );
}

for ( int32_t i = 0; i < availablePlayersCount; ++i ) {
if ( le.MouseClickLeft( playerRects[i] ) ) {
Expand Down

0 comments on commit 97055c9

Please sign in to comment.