MCPcopy
hub / github.com/g3n/engine / SetFirst

Method SetFirst

gui/itemscroller.go:181–187  ·  view source on GitHub ↗

SetFirst set the position of first visible if possible

(pos int)

Source from the content-addressed store, hash-verified

179
180// SetFirst set the position of first visible if possible
181func (s *ItemScroller) SetFirst(pos int) {
182
183 if pos >= 0 && pos <= s.maxFirst() {
184 s.first = pos
185 s.recalc()
186 }
187}
188
189// ScrollDown scrolls the list down one item if possible
190func (s *ItemScroller) ScrollDown() {

Callers

nothing calls this directly

Calls 2

maxFirstMethod · 0.95
recalcMethod · 0.95

Tested by

no test coverage detected