private void Init(IColorPreset colorPreset) { Color = colorPreset.DarkBackground; menuHolder = CreateChild <MenuHolder>("menu", 0); { menuHolder.Anchor = AnchorType.TopStretch; menuHolder.Pivot = PivotType.Top; menuHolder.RawWidth = 0f; menuHolder.Y = 0f; menuHolder.Height = 56f; } versionDisplay = CreateChild <VersionDisplay>("version", 1); { versionDisplay.Anchor = AnchorType.TopStretch; versionDisplay.Pivot = PivotType.Top; versionDisplay.RawWidth = 0f; versionDisplay.Y = -56f; versionDisplay.Height = 72f; } contentScroll = CreateChild <UguiScrollView>("content", 2); { contentScroll.Anchor = AnchorType.Fill; contentScroll.Offset = new Offset(0f, 128f, 0f, 0f); contentScroll.Background.Alpha = 0f; metaContainer = contentScroll.Container.CreateChild <MetaContainer>("meta"); { metaContainer.Anchor = AnchorType.TopStretch; metaContainer.Pivot = PivotType.Top; metaContainer.Y = -32f; metaContainer.Height = 360f; metaContainer.SetOffsetHorizontal(64f); } rankingContainer = contentScroll.Container.CreateChild <RankingContainer>("ranking"); { rankingContainer.Anchor = AnchorType.TopStretch; rankingContainer.Pivot = PivotType.Top; rankingContainer.Y = -424f; rankingContainer.Height = 360f; rankingContainer.SetOffsetHorizontal(64f); } actionsContainer = contentScroll.Container.CreateChild <ActionsContainer>("actions"); { actionsContainer.Anchor = AnchorType.TopStretch; actionsContainer.Pivot = PivotType.Top; actionsContainer.Y = -816f; actionsContainer.Height = 48f; actionsContainer.SetOffsetHorizontal(64f); } // Calculate height of the scrollview content. contentScroll.Container.Height = GetContentHeight(); } }