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

Method InsertTextString

src/console_gui.cpp:321–329  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

319 }
320
321 void InsertTextString(WidgetID, std::string_view str, bool marked, std::optional<size_t> caret, std::optional<size_t> insert_location, std::optional<size_t> replacement_end) override
322 {
323 if (_iconsole_cmdline.InsertString(str, marked, caret, insert_location, replacement_end)) {
324 _iconsole_tab_completion.Reset();
325 IConsoleWindow::scroll = 0;
326 IConsoleResetHistoryPos();
327 this->SetDirty();
328 }
329 }
330
331 const Textbuf *GetFocusedTextbuf() const override
332 {

Callers

nothing calls this directly

Calls 4

IConsoleResetHistoryPosFunction · 0.85
InsertStringMethod · 0.80
ResetMethod · 0.45
SetDirtyMethod · 0.45

Tested by

no test coverage detected