| 70 | } |
| 71 | |
| 72 | void EntryMenu::SwipeToPreviousPage() { |
| 73 | const auto old_entry_idx = this->cur_entry_idx; |
| 74 | const auto cur_idx_x = this->cur_entry_idx / g_EntryHeightCount; |
| 75 | const auto cur_idx_y = this->cur_entry_idx % g_EntryHeightCount; |
| 76 | |
| 77 | if(cur_idx_x > 0) { |
| 78 | if(this->base_entry_idx_x < this->entry_width_count) { |
| 79 | this->base_entry_idx_x = 0; |
| 80 | } |
| 81 | else { |
| 82 | this->base_entry_idx_x -= this->entry_width_count; |
| 83 | } |
| 84 | |
| 85 | if(this->cur_entry_idx < this->entry_page_count) { |
| 86 | this->cur_entry_idx = cur_idx_y; |
| 87 | } |
| 88 | else { |
| 89 | this->cur_entry_idx -= this->entry_page_count; |
| 90 | } |
| 91 | |
| 92 | this->NotifyFocusedEntryChanged(old_entry_idx); |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | void EntryMenu::SwipeToNextPage() { |
| 97 | const auto old_entry_idx = this->cur_entry_idx; |
no test coverage detected