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

Method onResize

src/openrct2-ui/windows/Multiplayer.cpp:600–638  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

598 }
599
600 void onResize() override
601 {
602 switch (page)
603 {
604 case WINDOW_MULTIPLAYER_PAGE_INFORMATION:
605 {
606 auto size = _windowInformationSize ? _windowInformationSize.value() : informationGetSize();
607 WindowSetResize(*this, size, size);
608 break;
609 }
610 case WINDOW_MULTIPLAYER_PAGE_PLAYERS:
611 {
612 WindowSetResize(*this, { 420, 124 }, { 500, 450 });
613
614 numListItems = (IsServerPlayerInvisible() ? Network::GetNumVisiblePlayers() : Network::GetNumPlayers());
615
616 widgets[WIDX_HEADER_PING].right = width - 5;
617
618 selectedListItem = -1;
619 invalidate();
620 break;
621 }
622 case WINDOW_MULTIPLAYER_PAGE_GROUPS:
623 {
624 WindowSetResize(*this, { 320, 200 }, { 320, 500 });
625
626 numListItems = Network::GetNumActions();
627
628 selectedListItem = -1;
629 invalidate();
630 break;
631 }
632 case WINDOW_MULTIPLAYER_PAGE_OPTIONS:
633 {
634 WindowSetResize(*this, { 300, 100 }, { 300, 100 });
635 break;
636 }
637 }
638 }
639
640 void onUpdate() override
641 {

Callers

nothing calls this directly

Calls 7

WindowSetResizeFunction · 0.85
GetNumVisiblePlayersFunction · 0.85
GetNumPlayersFunction · 0.85
GetNumActionsFunction · 0.85
valueMethod · 0.80
IsServerPlayerInvisibleFunction · 0.70
invalidateFunction · 0.50

Tested by

no test coverage detected