A fork of https://github.com/crosspoint-reader/crosspoint-reader
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add navigation hints to ChapterSelectionActivities (#294)

## Summary

Add navigation hints to Chapter Select - #190

### Before

![Mi 11X_20260108_214114_lmc_8
4](https://github.com/user-attachments/assets/45031d21-2c6c-4b7d-a5cc-6ad111bf5a70)

### After
![Mi 11X_20260108_213803_lmc_8
4](https://github.com/user-attachments/assets/1fa4ef22-63e4-4adb-8fc5-5fb8c7fa79fa)

authored by

Seth and committed by
GitHub
66811bf5 87287012

+12 -2
+6 -1
src/activities/reader/EpubReaderChapterSelectionActivity.cpp
··· 16 16 constexpr int lineHeight = 30; 17 17 18 18 const int screenHeight = renderer.getScreenHeight(); 19 - const int availableHeight = screenHeight - startY; 19 + const int endY = screenHeight - lineHeight; 20 + 21 + const int availableHeight = endY - startY; 20 22 int items = availableHeight / lineHeight; 21 23 22 24 // Ensure we always have at least one item per page to avoid division by zero ··· 133 135 renderer.drawText(UI_10_FONT_ID, 20 + (item.level - 1) * 15, 60 + (tocIndex % pageItems) * 30, item.title.c_str(), 134 136 tocIndex != selectorIndex); 135 137 } 138 + 139 + const auto labels = mappedInput.mapLabels("« Back", "Select", "Up", "Down"); 140 + renderer.drawButtonHints(UI_10_FONT_ID, labels.btn1, labels.btn2, labels.btn3, labels.btn4); 136 141 137 142 renderer.displayBuffer(); 138 143 }
+6 -1
src/activities/reader/XtcReaderChapterSelectionActivity.cpp
··· 14 14 constexpr int lineHeight = 30; 15 15 16 16 const int screenHeight = renderer.getScreenHeight(); 17 - const int availableHeight = screenHeight - startY; 17 + const int endY = screenHeight - lineHeight; 18 + 19 + const int availableHeight = endY - startY; 18 20 int items = availableHeight / lineHeight; 19 21 if (items < 1) { 20 22 items = 1; ··· 146 148 const char* title = chapter.name.empty() ? "Unnamed" : chapter.name.c_str(); 147 149 renderer.drawText(UI_10_FONT_ID, 20, 60 + (i % pageItems) * 30, title, i != selectorIndex); 148 150 } 151 + 152 + const auto labels = mappedInput.mapLabels("« Back", "Select", "Up", "Down"); 153 + renderer.drawButtonHints(UI_10_FONT_ID, labels.btn1, labels.btn2, labels.btn3, labels.btn4); 149 154 150 155 renderer.displayBuffer(); 151 156 }