game: min panel height on restore, to avoid unusable case

This commit is contained in:
Crypto City 2020-09-09 17:23:21 +00:00
parent 9bc07471f4
commit 7b2c785f0e

View File

@ -82,6 +82,7 @@
#define THERMOMETER_MAX_TEMPERATURE 150
#define THERMOMETER_FONT_SIZE 10
#define THERMOMETER_NOTCH_HEIGHT 1
#define MIN_PANEL_HEIGHT 48 // to ensure an unshaded panel protrudes, otherwise it gets confusing
using namespace Urho3D;
using namespace tb;
@ -309,7 +310,7 @@ void UIUrho3D::Configure()
if (width > 0 && height > 0)
{
command_window->Shade(false);
command_window->SetRect({x, y, width, height});
command_window->SetRect({x, y, width, std::max(height, MIN_PANEL_HEIGHT)});
if (shaded)
command_window->Shade(true);
}