Codechange: Spell 'Viewport' consistently

Some places in the codebase misspell 'Viewport' as 'ViewPort' or 'view_port'.
This patch makes everything consistent.
This commit is contained in:
TechGeekNZ
2020-06-29 13:38:29 +12:00
committed by Charles Pigott
parent 7d66540af5
commit a10013dd00
89 changed files with 207 additions and 207 deletions

View File

@@ -22,11 +22,11 @@
#include "safeguards.h"
/* Extra ViewPort Window Stuff */
static const NWidgetPart _nested_extra_view_port_widgets[] = {
/* Extra Viewport Window Stuff */
static const NWidgetPart _nested_extra_viewport_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY, WID_EV_CAPTION), SetDataTip(STR_EXTRA_VIEW_PORT_TITLE, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_CAPTION, COLOUR_GREY, WID_EV_CAPTION), SetDataTip(STR_EXTRA_VIEWPORT_TITLE, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_DEFSIZEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
@@ -154,25 +154,25 @@ public:
}
};
static WindowDesc _extra_view_port_desc(
static WindowDesc _extra_viewport_desc(
WDP_AUTO, "extra_viewport", 300, 268,
WC_EXTRA_VIEW_PORT, WC_NONE,
WC_EXTRA_VIEWPORT, WC_NONE,
0,
_nested_extra_view_port_widgets, lengthof(_nested_extra_view_port_widgets)
_nested_extra_viewport_widgets, lengthof(_nested_extra_viewport_widgets)
);
/**
* Show a new Extra Viewport window.
* @param tile Tile to center the view on. INVALID_TILE means to use the center of main viewport.
*/
void ShowExtraViewPortWindow(TileIndex tile)
void ShowExtraViewportWindow(TileIndex tile)
{
int i = 0;
/* find next free window number for extra viewport */
while (FindWindowById(WC_EXTRA_VIEW_PORT, i) != nullptr) i++;
while (FindWindowById(WC_EXTRA_VIEWPORT, i) != nullptr) i++;
new ExtraViewportWindow(&_extra_view_port_desc, i, tile);
new ExtraViewportWindow(&_extra_viewport_desc, i, tile);
}
/**
@@ -180,10 +180,10 @@ void ShowExtraViewPortWindow(TileIndex tile)
* Center it on the tile under the cursor, if the cursor is inside a viewport.
* If that fails, center it on main viewport center.
*/
void ShowExtraViewPortWindowForTileUnderCursor()
void ShowExtraViewportWindowForTileUnderCursor()
{
/* Use tile under mouse as center for new viewport.
* Do this before creating the window, it might appear just below the mouse. */
Point pt = GetTileBelowCursor();
ShowExtraViewPortWindow(pt.x != -1 ? TileVirtXY(pt.x, pt.y) : INVALID_TILE);
ShowExtraViewportWindow(pt.x != -1 ? TileVirtXY(pt.x, pt.y) : INVALID_TILE);
}