Merge tag '1.11.0-beta1' into jgrpp
# Conflicts: # src/console_cmds.cpp # src/gfx_func.h # src/industry.h # src/lang/czech.txt # src/lang/estonian.txt # src/lang/german.txt # src/lang/indonesian.txt # src/lang/japanese.txt # src/lang/norwegian_bokmal.txt # src/lang/russian.txt # src/lang/slovak.txt # src/saveload/saveload.h # src/station_gui.cpp # src/town_gui.cpp # src/vehicle_gui.cpp # src/video/sdl2_v.cpp # src/waypoint_gui.cpp
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include "tunnelbridge_map.h"
|
||||
#include "viewport_type.h"
|
||||
#include "guitimer_func.h"
|
||||
#include "viewport_func.h"
|
||||
#include "rev.h"
|
||||
|
||||
#include "widgets/misc_widget.h"
|
||||
@@ -48,6 +49,7 @@ static const NWidgetPart _nested_land_info_widgets[] = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_LAND_AREA_INFORMATION_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_LI_LOCATION), SetMinimalSize(12, 14), SetDataTip(SPR_GOTO_LOCATION, STR_LAND_AREA_INFORMATION_LOCATION_TOOLTIP),
|
||||
NWidget(WWT_DEBUGBOX, COLOUR_GREY),
|
||||
EndContainer(),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY, WID_LI_BACKGROUND), EndContainer(),
|
||||
@@ -397,6 +399,19 @@ public:
|
||||
::ShowNewGRFInspectWindow(GetGrfSpecFeature(this->tile), this->tile);
|
||||
}
|
||||
|
||||
void OnClick(Point pt, int widget, int click_count) override
|
||||
{
|
||||
switch (widget) {
|
||||
case WID_LI_LOCATION:
|
||||
if (_ctrl_pressed) {
|
||||
ShowExtraViewportWindow(this->tile);
|
||||
} else {
|
||||
ScrollMainWindowToTile(this->tile);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Some data on this window has become invalid.
|
||||
* @param data Information about the changed data.
|
||||
|
Reference in New Issue
Block a user