void CustomInitialize() { _hudLayout = UiControlManager.Instance.CreateControl<SimpleLayout>(); _hudLayout.FullScreen = true; var scoreLayout = UiControlManager.Instance.CreateControl<BoxLayout>(); scoreLayout.CurrentDirection = BoxLayout.Direction.Right; scoreLayout.Spacing = 5; var label = UiControlManager.Instance.CreateControl<LayoutableText>(); label.DisplayText = "Moves: "; scoreLayout.AddItem(label); _moveCountText = UiControlManager.Instance.CreateControl<LayoutableText>(); _moveCountText.DisplayText = _lastMoveCountValue.ToString(); scoreLayout.AddItem(_moveCountText); _hudLayout.AddItem(scoreLayout, HorizontalPosition.OffsetFromCenter(0), VerticalPosition.OffsetFromTop(-10)); }
private void CustomInitialize() { _layout = UiControlManager.Instance.CreateControl<BoxLayout>(); _layout.CurrentDirection = BoxLayout.Direction.Down; _layout.Spacing = 20; _layout.Margin = 20; _layout.BackgroundAnimationChains = GlobalContent.MenuBackground; _layout.CurrentBackgroundAnimationChainName = "Idle"; _layout.AttachTo(this, false); // Add the text and the loading image _text = UiControlManager.Instance.CreateControl<LayoutableText>(); _text.DisplayText = "Loading Level"; _layout.AddItem(_text, BoxLayout.Alignment.Centered); var img = UiControlManager.Instance.CreateControl<LayoutableSprite>(); img.AnimationChains = GlobalContent.LoadingAnimation; img.CurrentAnimationChainName = "Loading"; _layout.AddItem(img, BoxLayout.Alignment.Centered); }