MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / SetSelectedPage

Method SetSelectedPage

src/story_gui.cpp:629–638  ·  view source on GitHub ↗

* Sets the selected page. * @param page_index pool index of the page to select. */

Source from the content-addressed store, hash-verified

627 * @param page_index pool index of the page to select.
628 */
629 void SetSelectedPage(StoryPageID page_index)
630 {
631 if (this->selected_page_id != page_index) {
632 if (this->active_button_id != 0) ResetObjectToPlace();
633 this->active_button_id = StoryPageElementID::Invalid();
634 this->selected_page_id = page_index;
635 this->RefreshSelectedPage();
636 this->UpdatePrevNextDisabledState();
637 }
638 }
639
640 std::string GetWidgetString(WidgetID widget, StringID stringid) const override
641 {

Callers 5

SelectPrevPageMethod · 0.95
SelectNextPageMethod · 0.95
OnDropdownSelectMethod · 0.95
OnInvalidateDataMethod · 0.95
ShowStoryBookFunction · 0.80

Calls 4

RefreshSelectedPageMethod · 0.95
ResetObjectToPlaceFunction · 0.85
InvalidFunction · 0.85

Tested by

no test coverage detected