2026-10-28 18:02 UTC
Papyrix includes a ChapterListView to be exposed via its pivotal "Reader" UI state.
This tracks the chapter, page-num, & depth for all chapters as well as a button-bar, current & selected indices, scroll offset, & dirty flag. There's methods for resetting these properties, appending to the fixed-capacity array, updating all the counters to the same value, carefully incrementing/decrementing either by 1 or a given value, & possibly updating scroll-offset to ensure a certain chapter's visible.
1/
Replies (1)
-
@alcinnz@floss.social 2026-10-28 18:08
And there's a render method which clears the screen, renders a hardcoded title, calculates layout, ensures the current selection is visible, iterates over each chapter rendering them, renders a button bar, & flushes the display. Alongside this are somewhat similar views for a Home View (including a battery indicator, which may be individually rerendered) & a File List View (with a page indicator). The HomeView doesn't track its array itself, just displaying a single book at a time. 2/2Fin now!