Merge branch 'master' into jgrpp
# Conflicts: # src/articulated_vehicles.cpp # src/articulated_vehicles.h # src/base_media_base.h # src/base_media_func.h # src/build_vehicle_gui.cpp # src/dock_gui.cpp # src/main_gui.cpp # src/music_gui.cpp # src/network/network_chat_gui.cpp # src/network/network_content.cpp # src/newgrf.cpp # src/newgrf_roadstop.cpp # src/os/windows/string_uniscribe.h # src/os/windows/win32.cpp # src/rail_gui.cpp # src/road.cpp # src/road_gui.cpp # src/settings.cpp # src/settings_gui.cpp # src/smallmap_gui.cpp # src/strings.cpp # src/terraform_gui.cpp # src/tests/test_script_admin.cpp # src/tests/test_window_desc.cpp # src/timer/timer_game_calendar.h # src/vehicle.cpp # src/vehicle_base.h # src/viewport.cpp # src/widget_type.h # src/window.cpp # src/window_gui.h
This commit is contained in:
@@ -1065,7 +1065,7 @@ void SmallMapWindow::SetupWidgetData()
|
||||
SmallMapWindow::SmallMapWindow(WindowDesc *desc, int window_number) : Window(desc), refresh(GUITimer())
|
||||
{
|
||||
_smallmap_industry_highlight = INVALID_INDUSTRYTYPE;
|
||||
this->overlay = new LinkGraphOverlay(this, WID_SM_MAP, 0, this->GetOverlayCompanyMask(), 1);
|
||||
this->overlay = std::make_unique<LinkGraphOverlay>(this, WID_SM_MAP, 0, this->GetOverlayCompanyMask(), 1);
|
||||
this->InitNested(window_number);
|
||||
this->LowerWidget(this->map_type + WID_SM_CONTOUR);
|
||||
|
||||
@@ -1083,11 +1083,6 @@ SmallMapWindow::SmallMapWindow(WindowDesc *desc, int window_number) : Window(des
|
||||
this->refresh.SetInterval(this->GetRefreshPeriod());
|
||||
}
|
||||
|
||||
SmallMapWindow::~SmallMapWindow()
|
||||
{
|
||||
delete this->overlay;
|
||||
}
|
||||
|
||||
/* virtual */ void SmallMapWindow::Close([[maybe_unused]] int data)
|
||||
{
|
||||
this->BreakIndustryChainLink();
|
||||
@@ -1768,7 +1763,7 @@ public:
|
||||
this->resize_y = std::min(display->resize_y, bar->resize_y);
|
||||
}
|
||||
|
||||
void AssignSizePosition(SizingType sizing, uint x, uint y, uint given_width, uint given_height, bool rtl) override
|
||||
void AssignSizePosition(SizingType sizing, int x, int y, uint given_width, uint given_height, bool rtl) override
|
||||
{
|
||||
this->pos_x = x;
|
||||
this->pos_y = y;
|
||||
@@ -1879,7 +1874,7 @@ static const NWidgetPart _nested_smallmap_widgets[] = {
|
||||
EndContainer(),
|
||||
};
|
||||
|
||||
static WindowDesc _smallmap_desc(
|
||||
static WindowDesc _smallmap_desc(__FILE__, __LINE__,
|
||||
WDP_AUTO, "smallmap", 484, 314,
|
||||
WC_SMALLMAP, WC_NONE,
|
||||
0,
|
||||
|
Reference in New Issue
Block a user