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

Method OnClick

src/goal_gui.cpp:366–384  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

364 }
365
366 void OnClick([[maybe_unused]] Point pt, WidgetID widget, [[maybe_unused]] int click_count) override
367 {
368 switch (widget) {
369 case WID_GQ_BUTTON_1:
370 Command<CMD_GOAL_QUESTION_ANSWER>::Post(this->window_number, this->button[0]);
371 this->Close();
372 break;
373
374 case WID_GQ_BUTTON_2:
375 Command<CMD_GOAL_QUESTION_ANSWER>::Post(this->window_number, this->button[1]);
376 this->Close();
377 break;
378
379 case WID_GQ_BUTTON_3:
380 Command<CMD_GOAL_QUESTION_ANSWER>::Post(this->window_number, this->button[2]);
381 this->Close();
382 break;
383 }
384 }
385
386 void UpdateWidgetSize(WidgetID widget, Dimension &size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension &fill, [[maybe_unused]] Dimension &resize) override
387 {

Callers

nothing calls this directly

Calls 1

CloseMethod · 0.45

Tested by

no test coverage detected