Beispiel #1
0
        public void Create(Stats oStats, Camera oCamera)
        {
            this.Width   = Global.PixelSize(824);
            this.Height  = Global.PixelSize(472);
            this.Texture = "TurnStatsMenu3";
            this.Center  = oDisplacement;

            oMenuName            = new XNACS1Rectangle();
            oMenuName.Color      = new Color(0, 0, 0, 0);
            oMenuName.LabelFont  = "SmallHUD";
            oMenuName.Label      = "Resources Graphs";
            oMenuName.LabelColor = Color.White;

            oButtons             = new XNACS1Rectangle[nButtonCount];
            oButtonDisplacements = new Vector2[nButtonCount];
            for (int x = 0; x < oButtons.Count(); x++)
            {
                oButtons[x]                  = new XNACS1Rectangle(new Vector2(), fButtonWidth, fButtonHeight, "StatsMenuButton");
                oButtons[x].Label            = "" + (x + 1);
                oButtons[x].LabelFont        = "SmallHUD";
                oButtons[x].LabelColor       = Color.White;
                oButtons[x].TextureTintColor = oUnselectedColor;
                oButtonDisplacements[x]      = new Vector2(-36.35f + 3f * x, 19f);
            }
            oButtons[1].TextureTintColor = oOriginalColor;

            //oQuitButton = new XNACS1Rectangle(this.Center + oQuitButtonOffest, Global.PixelSize(37), Global.PixelSize(37), "CloseButton");
            //oQuitButton.Color = Color.Red;
            oRollsGraph = new Graph(new Vector2(-16f, -1.6f), new Vector2(Global.PixelSize(428), Global.PixelSize(362)),
                                    11, oStats.nRollCounts, "Rolls Made", new string[] { "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12" }, "GraphBox1");
            oRollsGraph.Recenter(this);
            oResourcesGraph = new Graph(new Vector2(21.6f, -1.6f), new Vector2(Global.PixelSize(314), Global.PixelSize(362)),
                                        5, oStats.nResourceCounts, "Resources Gained", new string[] { "Wood", "Lumber", "Ore", "Grain", "Brick" }, "GraphBox1");
            oResourcesGraph.Recenter(this);

            Recenter(oCamera);
        }
Beispiel #2
0
        public StatisticsMenu3(Stats oStats, Camera oCamera)
        {
            this.Width   = Global.PixelSize(824);
            this.Height  = Global.PixelSize(472);
            this.Texture = "TurnStatsMenu2";
            this.Center  = oDisplacement;

            //this.LabelColor = Color.Red;
            //this.Label += "Total Gained:";
            //for (int x = 0; x < 4; x++)
            //    this.Label += " " + oStats.nTotalResourcesGained[x];

            //this.Label += "\nTotal Lost:";
            //for (int x = 0; x < 4; x++)
            //    this.Label += " " + oStats.nTotalResourcesLost[x];

            //this.Label += "\n Gained Through Trading:";
            //for (int x = 0; x < 4; x++)
            //    this.Label += " " + oStats.nTotalResourcesLost[x];

            //this.Label += "\n Lost Through Trading:";
            //for (int x = 0; x < 4; x++)
            //    this.Label += " " + oStats.nTotalResourcesLost[x];

            //this.Label += "\n Robbers Used:";
            //for (int x = 0; x < 4; x++)
            //    this.Label += " " + oStats.nTotalResourcesLost[x];

            //this.Label += "\n Times Robbed:";
            //for (int x = 0; x < 4; x++)
            //    this.Label += " " + oStats.nTotalResourcesLost[x];

            //this.Label += "\n Gained From Advancement Cards:";
            //for (int x = 0; x < 4; x++)
            //    this.Label += " " + oStats.nTotalResourcesLost[x];

            //this.Label += "\n Lost From Advancement Cards:";
            //for (int x = 0; x < 4; x++)
            //    this.Label += " " + oStats.nTotalResourcesLost[x];

            //this.Label += "\n Lost From Blocking";
            //for (int x = 0; x < 4; x++)
            //    this.Label += " " + oStats.nTotalResourcesLost[x];


            oMenuName            = new XNACS1Rectangle();
            oMenuName.Color      = new Color(0, 0, 0, 0);
            oMenuName.LabelFont  = "SmallHUD";
            oMenuName.Label      = "Player Statistics";
            oMenuName.LabelColor = Color.White;

            oButtons             = new XNACS1Rectangle[nButtonCount];
            oButtonDisplacements = new Vector2[nButtonCount];
            for (int x = 0; x < oButtons.Count(); x++)
            {
                oButtons[x]                  = new XNACS1Rectangle(new Vector2(), fButtonWidth, fButtonHeight, "StatsMenuButton");
                oButtons[x].Label            = "" + (x + 1);
                oButtons[x].LabelFont        = "SmallHUD";
                oButtons[x].LabelColor       = Color.White;
                oButtons[x].TextureTintColor = oUnselectedColor;
                oButtonDisplacements[x]      = new Vector2(-36.35f + 3f * x, 19f);
            }
            oButtons[2].TextureTintColor = oOriginalColor;

            for (int x = 0; x < oStats.oPlayers.Count(); x++)
            {
                oPlayerNames[x]              = new XNACS1Rectangle();
                oPlayerNames[x].LabelFont    = "SmallHUD";
                oPlayerNames[x].Color        = new Color(0, 0, 0, 0);
                oPlayerNames[x].Label        = oStats.oPlayers[x].sName;
                oPlayerNames[x].LabelColor   = Color.White;
                oPlayerNamesDisplacements[x] = new Vector2(-19.5f + 15.9f * x, 16f);
            }

            Recenter(oCamera);
        }