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

Function GetMainViewBottom

src/window.cpp:2150–2154  ·  view source on GitHub ↗

* Return the bottom of the main view available for general use. * @return The vertical coordinate of the first unusable row, so 'top + height <= bottom' gives the correct result. * @note At and below the bottom y coordinate is often the status bar. */

Source from the content-addressed store, hash-verified

2148 * @note At and below the bottom y coordinate is often the status bar.
2149 */
2150int GetMainViewBottom()
2151{
2152 Window *w = FindWindowById(WC_STATUS_BAR, 0);
2153 return (w == nullptr) ? _screen.height : w->top;
2154}
2155
2156static bool _dragging_window; ///< A window is being dragged or resized.
2157

Callers 3

OnInitialPositionMethod · 0.85
OnInitialPositionMethod · 0.85
UpdateSizeAndPositionMethod · 0.85

Calls 1

FindWindowByIdFunction · 0.85

Tested by

no test coverage detected