512 B
512 B
how to render lists
- start at top of list area
- seek until ;list-offset \n have been read
- drawstr until \n (if y index is hihglihgt index, draw highlighted)
- increment y and reset x
- if y > height/8 - 80, break
how to highlight list elements
- if .Mouse/x > 64 && < width - 64 && .Mouse/y > 40 && < height - 40
- index = ((.Mouse/y - 40)/8) + ;list-offset
on click
- take highlight index
- seek listbuf until as many \n have been read
- read until next \n into loadcmdbuf + len(load )