* 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. */
| 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 | { |
nothing calls this directly
no test coverage detected