Add Tab and Cover touch kinds to TouchRegistry
Extends the Kind enum with two new touch interaction types: Tab (2) and Cover (3), enabling support for additional UI element touch handling.
This commit is contained in:
@@ -189,7 +189,14 @@ void HomeActivity::loop() {
|
||||
selectorIndex = static_cast<int>(recentBooks.size()) + tappedId;
|
||||
}
|
||||
|
||||
if (tapped || mappedInput.wasReleased(MappedInputManager::Button::Confirm)) {
|
||||
// A tap on the continue-reading cover selects that book (home selector index).
|
||||
int coverId = -1;
|
||||
const bool coverTapped = mappedInput.wasCoverTapped(coverId);
|
||||
if (coverTapped && coverId >= 0 && coverId < static_cast<int>(recentBooks.size())) {
|
||||
selectorIndex = coverId;
|
||||
}
|
||||
|
||||
if (tapped || coverTapped || mappedInput.wasReleased(MappedInputManager::Button::Confirm)) {
|
||||
if (selectorIndex < recentBooks.size()) {
|
||||
onSelectBook(recentBooks[selectorIndex].path);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user