Skip to content

Commit

Permalink
Show a range of available values for an input value dialog (#9533)
Browse files Browse the repository at this point in the history
  • Loading branch information
ihhub authored Feb 6, 2025
1 parent ad7f39e commit 7df5b64
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/fheroes2/gui/ui_dialog.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/***************************************************************************
* fheroes2: https://github.com/ihhub/fheroes2 *
* Copyright (C) 2021 - 2024 *
* Copyright (C) 2021 - 2025 *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
Expand Down Expand Up @@ -45,6 +45,8 @@
#include "resource.h"
#include "screen.h"
#include "spell_info.h"
#include "tools.h"
#include "translations.h"
#include "ui_button.h"
#include "ui_constants.h"
#include "ui_keyboard.h"
Expand Down Expand Up @@ -927,6 +929,14 @@ namespace fheroes2
return true;
}

if ( le.isMouseRightButtonPressedInArea( _editBox ) ) {
std::string message = _( "The available values range from %{min} to %{max}." );
StringReplace( message, "%{min}", _minimum );
StringReplace( message, "%{max}", _maximum );

fheroes2::showStandardTextMessage( {}, std::move( message ), Dialog::ZERO );
}

return false;
}

Expand Down

0 comments on commit 7df5b64

Please sign in to comment.