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

Method OnClick

src/date_gui.cpp:140–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138 }
139
140 void OnClick([[maybe_unused]] Point pt, WidgetID widget, [[maybe_unused]] int click_count) override
141 {
142 switch (widget) {
143 case WID_SD_DAY:
144 case WID_SD_MONTH:
145 case WID_SD_YEAR:
146 ShowDateDropDown(widget);
147 break;
148
149 case WID_SD_SET_DATE:
150 this->callback(this, TimerGameEconomy::ConvertYMDToDate(this->date.year, this->date.month, this->date.day));
151 this->Close();
152 break;
153 }
154 }
155
156 void OnDropdownSelect(WidgetID widget, int index, int) override
157 {

Callers

nothing calls this directly

Calls 1

CloseMethod · 0.45

Tested by

no test coverage detected