Update to 1.10.0-beta1
This commit is contained in:
@@ -80,7 +80,7 @@ public:
|
||||
this->viewport->dest_scrollpos_y = this->viewport->scrollpos_y;
|
||||
}
|
||||
|
||||
virtual void SetStringParameters(int widget) const
|
||||
void SetStringParameters(int widget) const override
|
||||
{
|
||||
switch (widget) {
|
||||
case WID_EV_CAPTION:
|
||||
@@ -90,7 +90,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual void OnClick(Point pt, int widget, int click_count)
|
||||
void OnClick(Point pt, int widget, int click_count) override
|
||||
{
|
||||
switch (widget) {
|
||||
case WID_EV_ZOOM_IN: DoZoomInOutWindow(ZOOM_IN, this); break;
|
||||
@@ -120,15 +120,15 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual void OnResize()
|
||||
void OnResize() override
|
||||
{
|
||||
if (this->viewport != NULL) {
|
||||
if (this->viewport != nullptr) {
|
||||
NWidgetViewport *nvp = this->GetWidget<NWidgetViewport>(WID_EV_VIEWPORT);
|
||||
nvp->UpdateViewportCoordinates(this);
|
||||
}
|
||||
}
|
||||
|
||||
virtual void OnScroll(Point delta)
|
||||
void OnScroll(Point delta) override
|
||||
{
|
||||
this->viewport->scrollpos_x += ScaleByZoom(delta.x, this->viewport->zoom);
|
||||
this->viewport->scrollpos_y += ScaleByZoom(delta.y, this->viewport->zoom);
|
||||
@@ -136,7 +136,7 @@ public:
|
||||
this->viewport->dest_scrollpos_y = this->viewport->scrollpos_y;
|
||||
}
|
||||
|
||||
virtual void OnMouseWheel(int wheel)
|
||||
void OnMouseWheel(int wheel) override
|
||||
{
|
||||
if (_settings_client.gui.scrollwheel_scrolling != 2) {
|
||||
ZoomInOrOutToCursorWindow(wheel < 0, this);
|
||||
@@ -148,7 +148,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;
|
||||
/* Only handle zoom message if intended for us (msg ZOOM_IN/ZOOM_OUT) */
|
||||
@@ -172,7 +172,7 @@ void ShowExtraViewPortWindow(TileIndex tile)
|
||||
int i = 0;
|
||||
|
||||
/* find next free window number for extra viewport */
|
||||
while (FindWindowById(WC_EXTRA_VIEW_PORT, i) != NULL) i++;
|
||||
while (FindWindowById(WC_EXTRA_VIEW_PORT, i) != nullptr) i++;
|
||||
|
||||
new ExtraViewportWindow(&_extra_view_port_desc, i, tile);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user