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

Method FindEntry

src/settingentry_gui.cpp:54–60  ·  view source on GitHub ↗

* Find setting entry at row \a row_num * @param row_num Index of entry to return * @param cur_row Current row number * @return The requested setting entry or \c nullptr if it not found (folded or filtered) */

Source from the content-addressed store, hash-verified

52 * @return The requested setting entry or \c nullptr if it not found (folded or filtered)
53 */
54BaseSettingEntry *BaseSettingEntry::FindEntry(uint row_num, uint *cur_row)
55{
56 if (this->IsFiltered()) return nullptr;
57 if (row_num == *cur_row) return this;
58 (*cur_row)++;
59 return nullptr;
60}
61
62/**
63 * Draw a row in the settings panel.

Callers 1

OptionsPanelClickMethod · 0.80

Calls 1

IsFilteredMethod · 0.95

Tested by

no test coverage detected