Merge branch 'master' into jgrpp
# Conflicts: # src/build_vehicle_gui.cpp # src/cheat_gui.cpp # src/company_gui.cpp # src/error_gui.cpp # src/fios_gui.cpp # src/gfx_func.h # src/graph_gui.cpp # src/group_gui.cpp # src/misc_gui.cpp # src/newgrf_debug_gui.cpp # src/order_gui.cpp # src/road_gui.cpp # src/roadveh_gui.cpp # src/settings_gui.cpp # src/ship_gui.cpp # src/station_gui.cpp # src/statusbar_gui.cpp # src/subsidy_gui.cpp # src/timetable_gui.cpp # src/town_gui.cpp # src/train_gui.cpp # src/tree_gui.cpp # src/vehicle_gui.cpp # src/widget.cpp # src/widgets/dropdown.cpp # src/window_gui.h
This commit is contained in:
@@ -755,7 +755,7 @@ struct GenerateLandscapeWindow : public Window {
|
||||
}
|
||||
}
|
||||
size->width += padding.width;
|
||||
size->height = std::max(size->height, (uint)(FONT_HEIGHT_NORMAL + WD_DROPDOWNTEXT_TOP + WD_DROPDOWNTEXT_BOTTOM));
|
||||
size->height = std::max(size->height, (uint)(FONT_HEIGHT_NORMAL + padding.height));
|
||||
}
|
||||
|
||||
void OnClick(Point pt, int widget, int click_count) override
|
||||
@@ -1597,13 +1597,15 @@ struct GenerateProgressWindow : public Window {
|
||||
void DrawWidget(const Rect &r, int widget) const override
|
||||
{
|
||||
switch (widget) {
|
||||
case WID_GP_PROGRESS_BAR:
|
||||
case WID_GP_PROGRESS_BAR: {
|
||||
/* Draw the % complete with a bar and a text */
|
||||
DrawFrameRect(r.left, r.top, r.right, r.bottom, COLOUR_GREY, FR_BORDERONLY);
|
||||
DrawFrameRect(r.left + 1, r.top + 1, (int)((r.right - r.left - 2) * _gws.percent / 100) + r.left + 1, r.bottom - 1, COLOUR_MAUVE, FR_NONE);
|
||||
DrawFrameRect(r, COLOUR_GREY, FR_BORDERONLY);
|
||||
Rect br = r.Shrink(WD_BEVEL_LEFT, WD_BEVEL_TOP, WD_BEVEL_RIGHT, WD_BEVEL_BOTTOM);
|
||||
DrawFrameRect(br.WithWidth(br.Width() * _gws.percent / 100, false), COLOUR_MAUVE, FR_NONE);
|
||||
SetDParam(0, _gws.percent);
|
||||
DrawString(r.left, r.right, r.top + 5, STR_GENERATION_PROGRESS, TC_FROMSTRING, SA_HOR_CENTER);
|
||||
DrawString(r.left, r.right, CenterBounds(r.top, r.bottom, FONT_HEIGHT_NORMAL), STR_GENERATION_PROGRESS, TC_FROMSTRING, SA_HOR_CENTER);
|
||||
break;
|
||||
}
|
||||
|
||||
case WID_GP_PROGRESS_TEXT:
|
||||
/* Tell which class we are generating */
|
||||
|
Reference in New Issue
Block a user