* Selects the next available page after the currently selected page. */
| 223 | * Selects the next available page after the currently selected page. |
| 224 | */ |
| 225 | void SelectNextPage() |
| 226 | { |
| 227 | if (!StoryPage::IsValidID(this->selected_page_id)) return; |
| 228 | |
| 229 | /* Find selected page. */ |
| 230 | for (auto iter = this->story_pages.begin(); iter != this->story_pages.end(); iter++) { |
| 231 | const StoryPage *p = *iter; |
| 232 | if (p->index == this->selected_page_id) { |
| 233 | /* Select the page after selected page. */ |
| 234 | iter++; |
| 235 | if (iter != this->story_pages.end()) { |
| 236 | this->SetSelectedPage((*iter)->index); |
| 237 | } |
| 238 | return; |
| 239 | } |
| 240 | } |
| 241 | } |
| 242 | |
| 243 | /** |
| 244 | * Builds the page selector drop down list. |
no test coverage detected