Merge branch 'master' into jgrpp
This commit is contained in:
@@ -311,13 +311,18 @@ DEF_CONSOLE_CMD(ConZoomToLevel)
|
|||||||
"- The lowest supported zoom-in level is %u.",
|
"- The lowest supported zoom-in level is %u.",
|
||||||
std::max(ZOOM_LVL_MIN, _settings_client.gui.zoom_min)
|
std::max(ZOOM_LVL_MIN, _settings_client.gui.zoom_min)
|
||||||
);
|
);
|
||||||
IConsolePrintF(
|
|
||||||
CC_WARNING,
|
if (ZOOM_LVL_MIN < _settings_client.gui.zoom_min) {
|
||||||
_settings_client.gui.zoom_max < ZOOM_LVL_MAX ?
|
IConsolePrintF(CC_WARNING, "The lowest zoom-in level allowed by current client settings is %u.", std::max(ZOOM_LVL_MIN, _settings_client.gui.zoom_min));
|
||||||
"- The highest zoom-out level allowed by current client settings is %u." :
|
} else {
|
||||||
"- The highest supported zoom-out level is %u.",
|
IConsolePrintF(CC_WARNING, "The lowest supported zoom-in level is %u.", std::max(ZOOM_LVL_MIN, _settings_client.gui.zoom_min));
|
||||||
std::min(_settings_client.gui.zoom_max, ZOOM_LVL_MAX)
|
}
|
||||||
);
|
|
||||||
|
if (_settings_client.gui.zoom_max < ZOOM_LVL_MAX) {
|
||||||
|
IConsolePrintF(CC_WARNING, "The highest zoom-out level allowed by current client settings is %u.", std::min(_settings_client.gui.zoom_max, ZOOM_LVL_MAX));
|
||||||
|
} else {
|
||||||
|
IConsolePrintF(CC_WARNING, "The highest supported zoom-out level is %u.", std::min(_settings_client.gui.zoom_max, ZOOM_LVL_MAX));
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case 2: {
|
case 2: {
|
||||||
|
@@ -3423,7 +3423,7 @@ std::unique_ptr<NWidgetBase> MakeCompanyButtonRows(WidgetID widget_first, Widget
|
|||||||
|
|
||||||
Dimension sprite_size = GetSpriteSize(SPR_COMPANY_ICON, nullptr, ZOOM_LVL_OUT_4X);
|
Dimension sprite_size = GetSpriteSize(SPR_COMPANY_ICON, nullptr, ZOOM_LVL_OUT_4X);
|
||||||
sprite_size.width += WidgetDimensions::unscaled.matrix.Horizontal();
|
sprite_size.width += WidgetDimensions::unscaled.matrix.Horizontal();
|
||||||
sprite_size.height += WidgetDimensions::unscaled.matrix.Vertical() + 1; // 1 for the 'offset' of being pressed
|
sprite_size.height += WidgetDimensions::unscaled.matrix.Vertical();
|
||||||
|
|
||||||
for (WidgetID widnum = widget_first; widnum <= widget_last; widnum++) {
|
for (WidgetID widnum = widget_first; widnum <= widget_last; widnum++) {
|
||||||
/* Ensure there is room in 'hor' for another button. */
|
/* Ensure there is room in 'hor' for another button. */
|
||||||
|
Reference in New Issue
Block a user