MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / ChangeTab

Method ChangeTab

src/openrct2-ui/scripting/CustomWindow.cpp:748–764  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

746 }
747
748 void ChangeTab(size_t tabIndex)
749 {
750 if (page == static_cast<int16_t>(tabIndex) && !widgets.empty())
751 return;
752
753 page = static_cast<int16_t>(tabIndex);
754 currentFrame = 0;
755 RefreshWidgets();
756
757 invalidate();
758 onResize();
759 onPrepareDraw();
760 WindowInitScrollWidgets(*this);
761 invalidate();
762
763 InvokeEventHandler(_info.Owner, _info.Desc.OnTabChange);
764 }
765
766 const CustomWindowInfo& getInfo() const
767 {

Callers 1

UpdateWindowTabFunction · 0.80

Calls 4

WindowInitScrollWidgetsFunction · 0.85
InvokeEventHandlerFunction · 0.85
invalidateFunction · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected