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

Method OnClick

src/statusbar_gui.cpp:185–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183 }
184
185 void OnClick([[maybe_unused]] Point pt, WidgetID widget, [[maybe_unused]] int click_count) override
186 {
187 switch (widget) {
188 case WID_S_MIDDLE: ShowLastNewsMessage(); break;
189 case WID_S_RIGHT: if (_local_company != COMPANY_SPECTATOR) ShowCompanyFinances(_local_company); break;
190 default: ResetObjectToPlace();
191 }
192 }
193
194 /** Move information on the ticker slowly from one side to the other. */
195 const IntervalTimer<TimerWindow> ticker_scroll_interval = {std::chrono::milliseconds(15), [this](uint count) {

Callers

nothing calls this directly

Calls 3

ShowLastNewsMessageFunction · 0.85
ShowCompanyFinancesFunction · 0.85
ResetObjectToPlaceFunction · 0.85

Tested by

no test coverage detected