コード例 #1
0
ファイル: GridScreen.cs プロジェクト: Gary-The-Cat/Dashboard
        public void OnRender(RenderTarget target)
        {
            target.SetView(appManager.GetDefaultView());

            var size = GetFixedMaxSize();

            for (int x = 0; x < NumColumns; x++)
            {
                for (int y = 0; y < NumRows; y++)
                {
                    var visual = grid[x, y];

                    // If the visual has not been set, skip it and draw the next.
                    if (visual == null)
                    {
                        continue;
                    }

                    visual.SetDrawableSize(size);
                    visual.SetDrawableOrigin(size / 2);
                    visual.SetDrawablePosition(GetPositionFromRowColumn(x, y));

                    target.Draw(visual.GetDrawable());
                }
            }
        }
コード例 #2
0
        public override void OnRender(RenderTarget target)
        {
            base.OnRender(target);
            simulationVisualization.OnRender(target);

            target.SetView(appManager.GetDefaultView());
            backButton.OnRender(target);
        }
コード例 #3
0
        public override void OnRender(RenderTarget target)
        {
            target.SetView(appManager.GetDefaultView());

            buttons.ForEach(b => b.OnRender(target));
        }