MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / GetMainViewTop

Function GetMainViewTop

src/window.cpp:2139–2143  ·  view source on GitHub ↗

* Return the top of the main view available for general use. * @return Uppermost vertical coordinate available. * @note Above the upper y coordinate is often the main toolbar. */

Source from the content-addressed store, hash-verified

2137 * @note Above the upper y coordinate is often the main toolbar.
2138 */
2139int GetMainViewTop()
2140{
2141 Window *w = FindWindowById(WC_MAIN_TOOLBAR, 0);
2142 return (w == nullptr) ? 0 : w->top + w->height;
2143}
2144
2145/**
2146 * Return the bottom of the main view available for general use.

Callers 4

OnInitialPositionMethod · 0.85
OnInitialPositionMethod · 0.85
OnInitialPositionMethod · 0.85
UpdateSizeAndPositionMethod · 0.85

Calls 1

FindWindowByIdFunction · 0.85

Tested by

no test coverage detected