Beispiel #1
0
        private void InitWindow()
        {
            var window = new UIWindow();

            window.AddConstraint(Edge.CenterY, null, Edge.CenterY, 0f, ConstraintCategory.Initialization);
            window.AddConstraint(Edge.Right, null, Edge.Right, 50f, ConstraintCategory.Initialization);

            var contentPanel = new UIScrollWindow(UIScrollWindow.ScrollBarMode.Both);

            contentPanel.AddConstraint(Edge.Dock, window.BodyPanel, Edge.Dock);

            var img = new UIImage("graphics/map");

            img.Tag = "Map";
            img.AddConstraint(Edge.TopLeft, contentPanel.ScrollPanel, Edge.TopLeft, ConstraintCategory.Initialization);
            contentPanel.AddChild(img);

            window.BodyPanel.AddChild(contentPanel);
            uiManager.Add(window);
        }