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

Method NetworkChatWindow

src/network/network_chat_gui.cpp:310–324  ·  view source on GitHub ↗

* Create a chat input window. * @param desc Description of the looks of the window. * @param type The type of destination. * @param dest The actual destination index. */

Source from the content-addressed store, hash-verified

308 * @param dest The actual destination index.
309 */
310 NetworkChatWindow(WindowDesc &desc, DestType type, int dest)
311 : Window(desc), dtype(type), dest(dest), message_editbox(NETWORK_CHAT_LENGTH), chat_tab_completion(&message_editbox.text)
312 {
313 this->querystrings[WID_NC_TEXTBOX] = &this->message_editbox;
314 this->message_editbox.cancel_button = WID_NC_CLOSE;
315 this->message_editbox.ok_button = WID_NC_SENDBUTTON;
316
317 this->CreateNestedTree();
318 this->FinishInitNested(type);
319
320 this->SetFocusedWidget(WID_NC_TEXTBOX);
321 InvalidateWindowData(WC_NEWS_WINDOW, 0, this->height);
322
323 PositionNetworkChatWindow(this);
324 }
325
326 void Close([[maybe_unused]] int data = 0) override
327 {

Callers

nothing calls this directly

Calls 5

CreateNestedTreeMethod · 0.80
FinishInitNestedMethod · 0.80
SetFocusedWidgetMethod · 0.80
InvalidateWindowDataFunction · 0.50

Tested by

no test coverage detected