improve documentation for edit.draw

This commit is contained in:
Kartik K. Agaram 2023-06-07 22:10:30 -07:00
parent d931b0123d
commit 69ddc6fbb8
1 changed files with 6 additions and 3 deletions

View File

@ -215,9 +215,12 @@ early warning if you break something.
* `edit.quit()` -- calling this ensures any final edits are flushed to disk
before the app exits.
* `edit.draw(state)` -- call this from `on.draw` to display the current editor
state on the app window as requested in the call to `edit.initialize_state`
that created `state`.
* `edit.draw(state, fg, hide_cursor)` -- call this from `on.draw` to display
the current editor state on the app window as requested in the call to
`edit.initialize_state` that created `state`. `fg` is the color for
foreground text (`Text_color` is a good default). Set `hide_cursor` to stop
showing a blinking cursor (usually because you want a `readonly` editor; see
below).
* `edit.update(state, dt)` -- call this from `on.update` to periodically
auto-save editor contents to disk.