Ejemplo n.º 1
0
        public override void Draw(SpriteBatch spriteBatch, GameTime gameTime)
        {
            _barComponent.Draw(spriteBatch);

            // Debug draws
            if (showBoundingBox)
            {
                collisionComponent.DrawBoundingBox(spriteBatch);
            }
        }
Ejemplo n.º 2
0
        protected void AddGraph()
        {
            var gaugeBlock = new BarComponent(pid)
            {
                Width       = this.Width - (borderEdgePadding * 2),
                Height      = GetGaugeHeight() - (borderEdgePadding * 2),
                Orientation = Orientation.Horizontal,
            };
            var border = new Border()
            {
                BorderThickness = new System.Windows.Thickness(borderEdgePadding, borderEdgePadding, borderEdgePadding, borderEdgePadding),
                Background      = new SolidColorBrush(Colors.Black),
            };

            border.Child = gaugeBlock;
            Children.Add(border);
            SetLeft(border, 0);
            SetTop(border, Height - gaugeBlock.Height - (borderEdgePadding * 2));
            gaugeBlock.Draw();
        }
        private void AddGraph()
        {
            BarComponent barGraph = new BarComponent(pid)
            {
                Width           = ContentPanel.Width,
                Height          = GetGaugeHeight() - 2,
                Orientation     = Orientation.Vertical,
                EmptyColor      = new SolidColorBrush(gaugeSettings.BackgroundColor),
                SolidValueColor = new SolidColorBrush(GraphColor)
            };

            ContentPanel.Children.Add(barGraph);
            barGraph.Draw();

            /*ContentPanel.Children.Add(
             *  new Line()
             *  {
             *      StrokeThickness = 2,
             *      Stroke = new SolidColorBrush(GraphColor),
             *      X1 = X2 = Y1 = Y2 =
             *  }
             * );*/
        }