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

Method OnClick

src/misc_gui.cpp:290–301  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

288 }
289
290 void OnClick([[maybe_unused]] Point pt, WidgetID widget, [[maybe_unused]] int click_count) override
291 {
292 switch (widget) {
293 case WID_LI_LOCATION:
294 if (_ctrl_pressed) {
295 ShowExtraViewportWindow(this->tile);
296 } else {
297 ScrollMainWindowToTile(this->tile);
298 }
299 break;
300 }
301 }
302
303 /**
304 * Some data on this window has become invalid.

Callers

nothing calls this directly

Calls 2

ShowExtraViewportWindowFunction · 0.85
ScrollMainWindowToTileFunction · 0.85

Tested by

no test coverage detected