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

Method UpdateHistoryScrollpos

src/textfile_gui.cpp:347–350  ·  view source on GitHub ↗

* Update the scroll position to the current, so we can restore there if we go back. */

Source from the content-addressed store, hash-verified

345 * Update the scroll position to the current, so we can restore there if we go back.
346 */
347void TextfileWindow::UpdateHistoryScrollpos()
348{
349 this->history[this->history_pos].scrollpos = this->GetScrollbar(WID_TF_VSCROLLBAR)->GetPosition();
350}
351
352/**
353 * Navigate through the history, either forward or backward.

Callers 4

AppendHistoryMethod · 0.95
NavigateHistoryMethod · 0.95
OnHyperlinkClickMethod · 0.95
NavigateToFileMethod · 0.95

Calls 2

GetPositionMethod · 0.80
GetScrollbarMethod · 0.80

Tested by

no test coverage detected