public GraphPanel(Game game)
            : base(game)
        {
            topBar           = new Sprite(game, GraphicsCollection.GetPack("pixel"));
            topBar.Width     = 300;
            topBar.Height    = 2;
            topBar.XRelative = 120;
            topBar.YRelative = 99;
            topBar.Tint      = Color.Orange;
            AddChild(topBar);

            bottomBar           = new Sprite(game, GraphicsCollection.GetPack("pixel"));
            bottomBar.Width     = 300;
            bottomBar.Height    = 2;
            bottomBar.XRelative = 120;
            bottomBar.YRelative = 201;
            bottomBar.Tint      = Color.Orange;
            AddChild(bottomBar);

            startYear           = new SpriteText(game, FontsCollection.GetPack("Calibri 11").Font);
            startYear.XRelative = 120;
            startYear.YRelative = 180;
            AddChild(startYear);

            endYear           = new SpriteText(game, FontsCollection.GetPack("Calibri 11").Font);
            endYear.XRelative = 390;
            endYear.YRelative = 180;
            AddChild(endYear);

            //90, 440
            bars = new List <GraphBar>(300);
            for (int year = 0; year < 300; year++)
            {
                GraphBar bar = new GraphBar(game, 0);
                bar.XRelative = 200 + year;
                bar.YRelative = 200;
                bars.Add(bar);
                AddChild(bar);
            }

            selectedYear           = new SpriteText(game, FontsCollection.GetPack("Calibri 11").Font);
            selectedYear.XRelative = 130;
            selectedYear.YRelative = 55;

            AddChild(selectedYear);
        }
Example #2
0
        public GraphPanel(Game game)
            : base(game)
        {
            topBar = new Sprite(game, GraphicsCollection.GetPack("pixel"));
            topBar.Width = 300;
            topBar.Height = 2;
            topBar.XRelative = 120;
            topBar.YRelative = 99;
            topBar.Tint = Color.Orange;
            AddChild(topBar);

            bottomBar = new Sprite(game, GraphicsCollection.GetPack("pixel"));
            bottomBar.Width = 300;
            bottomBar.Height = 2;
            bottomBar.XRelative = 120;
            bottomBar.YRelative = 201;
            bottomBar.Tint = Color.Orange;
            AddChild(bottomBar);

            startYear = new SpriteText(game, FontsCollection.GetPack("Calibri 11").Font);
            startYear.XRelative = 120;
            startYear.YRelative = 180;
            AddChild(startYear);

            endYear = new SpriteText(game, FontsCollection.GetPack("Calibri 11").Font);
            endYear.XRelative = 390;
            endYear.YRelative = 180;
            AddChild(endYear);

            //90, 440
            bars = new List<GraphBar>(300);
            for (int year = 0; year < 300; year++)
            {
                GraphBar bar = new GraphBar(game, 0);
                bar.XRelative = 200 + year;
                bar.YRelative = 200;
                bars.Add(bar);
                AddChild(bar);
            }

            selectedYear = new SpriteText(game, FontsCollection.GetPack("Calibri 11").Font);
            selectedYear.XRelative = 130;
            selectedYear.YRelative = 55;
            
            AddChild(selectedYear);
        }