* Updates the content of selected page. */
| 181 | * Updates the content of selected page. |
| 182 | */ |
| 183 | void RefreshSelectedPage() |
| 184 | { |
| 185 | /* Generate generic title if selected page have no custom title. */ |
| 186 | StoryPage *page = this->GetSelPage(); |
| 187 | if (page != nullptr && page->title.empty()) { |
| 188 | selected_generic_title = GetString(STR_STORY_BOOK_GENERIC_PAGE_ITEM, GetSelPageNum() + 1); |
| 189 | } |
| 190 | |
| 191 | this->story_page_elements.ForceRebuild(); |
| 192 | this->BuildStoryPageElementList(); |
| 193 | |
| 194 | if (this->active_button_id != StoryPageElementID::Invalid()) ResetObjectToPlace(); |
| 195 | |
| 196 | this->vscroll->SetCount(this->GetContentHeight()); |
| 197 | this->SetWidgetDirty(WID_SB_SCROLLBAR); |
| 198 | this->SetWidgetDirty(WID_SB_SEL_PAGE); |
| 199 | this->SetWidgetDirty(WID_SB_PAGE_PANEL); |
| 200 | } |
| 201 | |
| 202 | /** |
| 203 | * Selects the previous available page before the currently selected page. |
no test coverage detected