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

Method OnClick

src/network/network_chat_gui.cpp:371–382  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

369 }
370
371 void OnClick([[maybe_unused]] Point pt, WidgetID widget, [[maybe_unused]] int click_count) override
372 {
373 switch (widget) {
374 case WID_NC_SENDBUTTON: /* Send */
375 SendChat(this->message_editbox.text.GetText(), this->dtype, this->dest);
376 [[fallthrough]];
377
378 case WID_NC_CLOSE: /* Cancel */
379 this->Close();
380 break;
381 }
382 }
383
384 EventState OnKeyPress([[maybe_unused]] char32_t key, uint16_t keycode) override
385 {

Callers

nothing calls this directly

Calls 3

CloseMethod · 0.95
SendChatFunction · 0.85
GetTextMethod · 0.45

Tested by

no test coverage detected