Merge branch 'master' into jgrpp

Replace build and refit, and group collapse implementations
Fix template creation build and refit

# Conflicts:
#	Makefile.bundle.in
#	config.lib
#	src/animated_tile.cpp
#	src/blitter/32bpp_anim.hpp
#	src/blitter/32bpp_base.hpp
#	src/blitter/8bpp_base.hpp
#	src/blitter/null.hpp
#	src/build_vehicle_gui.cpp
#	src/command.cpp
#	src/command_func.h
#	src/console_gui.cpp
#	src/core/smallstack_type.hpp
#	src/date.cpp
#	src/debug.cpp
#	src/genworld_gui.cpp
#	src/ground_vehicle.hpp
#	src/group_gui.cpp
#	src/lang/korean.txt
#	src/linkgraph/linkgraph_gui.h
#	src/main_gui.cpp
#	src/misc_gui.cpp
#	src/network/core/game.h
#	src/network/core/packet.cpp
#	src/network/core/udp.cpp
#	src/network/core/udp.h
#	src/network/network_content.cpp
#	src/network/network_type.h
#	src/network/network_udp.cpp
#	src/newgrf_house.h
#	src/openttd.cpp
#	src/order_cmd.cpp
#	src/order_gui.cpp
#	src/os/unix/crashlog_unix.cpp
#	src/os/windows/crashlog_win.cpp
#	src/osk_gui.cpp
#	src/pathfinder/opf/opf_ship.cpp
#	src/rail_cmd.cpp
#	src/rail_gui.cpp
#	src/saveload/saveload.cpp
#	src/settings.cpp
#	src/settings_gui.cpp
#	src/smallmap_gui.h
#	src/station_base.h
#	src/station_cmd.cpp
#	src/table/gameopt_settings.ini
#	src/table/newgrf_debug_data.h
#	src/table/settings.ini
#	src/timetable_gui.cpp
#	src/toolbar_gui.cpp
#	src/train_gui.cpp
#	src/vehicle.cpp
#	src/vehicle_gui.cpp
#	src/vehiclelist.cpp
#	src/viewport.cpp
#	src/widgets/dropdown.cpp
#	src/window_gui.h
This commit is contained in:
Jonathan G Rennison
2019-03-27 18:12:04 +00:00
422 changed files with 4697 additions and 6619 deletions

View File

@@ -74,7 +74,7 @@ public:
char landinfo_data[LAND_INFO_LINE_END][LAND_INFO_LINE_BUFF_SIZE];
TileIndex tile;
virtual void DrawWidget(const Rect &r, int widget) const
void DrawWidget(const Rect &r, int widget) const override
{
if (widget != WID_LI_BACKGROUND) return;
@@ -93,7 +93,7 @@ public:
}
}
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
{
if (widget != WID_LI_BACKGROUND) return;
@@ -146,7 +146,7 @@ public:
#undef LANDINFOD_LEVEL
}
virtual void OnInit()
void OnInit() override
{
Town *t = ClosestTownFromTile(tile, _settings_game.economy.dist_local_authority);
@@ -354,12 +354,12 @@ public:
if (!found) this->landinfo_data[LAND_INFO_MULTICENTER_LINE][0] = '\0';
}
virtual bool IsNewGRFInspectable() const
bool IsNewGRFInspectable() const override
{
return ::IsNewGRFInspectable(GetGrfSpecFeature(this->tile), this->tile);
}
virtual void ShowNewGRFInspectWindow() const
void ShowNewGRFInspectWindow() const override
{
::ShowNewGRFInspectWindow(GetGrfSpecFeature(this->tile), this->tile);
}
@@ -369,7 +369,7 @@ public:
* @param data Information about the changed data.
* @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
*/
virtual void OnInvalidateData(int data = 0, bool gui_scope = true)
void OnInvalidateData(int data = 0, bool gui_scope = true) override
{
if (!gui_scope) return;
switch (data) {
@@ -501,14 +501,14 @@ struct AboutWindow : public Window {
this->timer.SetInterval(TIMER_INTERVAL);
}
virtual void SetStringParameters(int widget) const
void SetStringParameters(int widget) const override
{
if (widget == WID_A_WEBSITE) SetDParamStr(0, "Main project website: http://www.openttd.org");
if (widget == WID_A_WEBSITE1) SetDParamStr(0, "Patchpack thread: https://www.tt-forums.net/viewtopic.php?f=33&t=73469");
if (widget == WID_A_WEBSITE2) SetDParamStr(0, "Patchpack Github: https://github.com/JGRennison/OpenTTD-patches");
}
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
{
if (widget != WID_A_SCROLLING_TEXT) return;
@@ -524,7 +524,7 @@ struct AboutWindow : public Window {
*size = maxdim(*size, d);
}
virtual void DrawWidget(const Rect &r, int widget) const
void DrawWidget(const Rect &r, int widget) const override
{
if (widget != WID_A_SCROLLING_TEXT) return;
@@ -539,7 +539,7 @@ struct AboutWindow : public Window {
}
}
virtual void OnRealtimeTick(uint delta_ms)
void OnRealtimeTick(uint delta_ms) override
{
uint count = this->timer.CountElapsed(delta_ms);
if (count > 0) {
@@ -711,7 +711,7 @@ struct TooltipsWindow : public Window
CLRBITS(this->flags, WF_WHITE_BORDER);
}
virtual Point OnInitialPosition(int16 sm_width, int16 sm_height, int window_number)
Point OnInitialPosition(int16 sm_width, int16 sm_height, int window_number) override
{
/* Find the free screen space between the main toolbar at the top, and the statusbar at the bottom.
* Add a fixed distance 2 so the tooltip floats free from both bars.
@@ -731,7 +731,7 @@ struct TooltipsWindow : public Window
return pt;
}
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
{
/* There is only one widget. */
for (uint i = 0; i != this->paramcount; i++) SetDParam(i, this->params[i]);
@@ -744,7 +744,7 @@ struct TooltipsWindow : public Window
size->height += 2 + WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM;
}
virtual void DrawWidget(const Rect &r, int widget) const
void DrawWidget(const Rect &r, int widget) const override
{
/* There is only one widget. */
GfxFillRect(r.left, r.top, r.right, r.bottom, PC_BLACK);
@@ -760,7 +760,7 @@ struct TooltipsWindow : public Window
}
}
virtual void OnMouseLoop()
void OnMouseLoop() override
{
/* Always close tooltips when the cursor is not in our window. */
if (!_cursor.in_window || this->delete_next_mouse_loop) {
@@ -772,8 +772,8 @@ struct TooltipsWindow : public Window
* we are dragging the tool. Normal tooltips work with hover or rmb. */
switch (this->close_cond) {
case TCC_RIGHT_CLICK: if (!_right_button_down) delete this; break;
case TCC_LEFT_CLICK: if (!_left_button_down) delete this; break;
case TCC_HOVER: if (!_mouse_hovering) delete this; break;
case TCC_NONE: break;
case TCC_NEXT_LOOP: this->delete_next_mouse_loop = true; break;
case TCC_HOVER_VIEWPORT:
@@ -1037,7 +1037,7 @@ struct QueryStringWindow : public Window
this->SetFocusedWidget(WID_QS_TEXT);
}
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
{
if (widget == WID_QS_DEFAULT && (this->flags & QSF_ENABLE_DEFAULT) == 0) {
/* We don't want this widget to show! */
@@ -1047,7 +1047,7 @@ struct QueryStringWindow : public Window
}
}
virtual void SetStringParameters(int widget) const
void SetStringParameters(int widget) const override
{
if (widget == WID_QS_CAPTION) SetDParam(0, this->editbox.caption);
}
@@ -1066,7 +1066,7 @@ struct QueryStringWindow : public Window
}
}
virtual void OnClick(Point pt, int widget, int click_count)
void OnClick(Point pt, int widget, int click_count) override
{
switch (widget) {
case WID_QS_DEFAULT:
@@ -1161,7 +1161,7 @@ struct QueryWindow : public Window {
if (this->proc != NULL) this->proc(this->parent, false);
}
virtual void SetStringParameters(int widget) const
void SetStringParameters(int widget) const override
{
switch (widget) {
case WID_Q_CAPTION:
@@ -1175,7 +1175,7 @@ struct QueryWindow : public Window {
}
}
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
{
if (widget != WID_Q_TEXT) return;
@@ -1185,7 +1185,7 @@ struct QueryWindow : public Window {
*size = d;
}
virtual void DrawWidget(const Rect &r, int widget) const
void DrawWidget(const Rect &r, int widget) const override
{
if (widget != WID_Q_TEXT) return;
@@ -1193,7 +1193,7 @@ struct QueryWindow : public Window {
this->message, TC_FROMSTRING, SA_CENTER);
}
virtual void OnClick(Point pt, int widget, int click_count)
void OnClick(Point pt, int widget, int click_count) override
{
switch (widget) {
case WID_Q_YES: {
@@ -1216,7 +1216,7 @@ struct QueryWindow : public Window {
}
}
virtual EventState OnKeyPress(WChar key, uint16 keycode)
EventState OnKeyPress(WChar key, uint16 keycode) override
{
/* ESC closes the window, Enter confirms the action */
switch (keycode) {