예제 #1
0
 public StatusMenu(Family f)
 {
     family = f;
     mainPos = new Point(279, 981);
     background = new Rectangle(mainPos.X, mainPos.Y, 250, 100, Color.Black, 50, 1, Color.Black);
     lfamily = new Label(family.GetName(), new Point(mainPos.X + 10, mainPos.Y + 10), 0.3f);
     lstatus = new Label(SaveData.Instance.GetProgress().ToString(), new Point(mainPos.X + 10, mainPos.Y + 35), 0.3f);//TODO get current lfamily status
     progressBar = new ProgressBar(mainPos.X + 10, mainPos.Y + 65, 230, 25, Color.Black, 50, Color.Blue, 100);//TODO get current color
     progressBar.SetMax(1000);
     progressBar.SetValue(500);
 }
예제 #2
0
        public MissionMenu(Action a)
        {
            mainPos = new Point(10, 10);
            onAccept = a;

            imgs = new List<Rectangle>
            {
                new Rectangle(mainPos.X, mainPos.Y, 450, 700, Color.Black, 50, 1, Color.Black),//Background
                new Rectangle(mainPos.X + 25, mainPos.Y + 25, 400, 50, Color.Black, 50, 1, Color.Black),//Name Box
                new Rectangle(mainPos.X + 25, mainPos.Y + 100, 400, 500, Color.Black, 50, 1, Color.Black)//Mission Box
            };

            lName = new Label("", new Point(mainPos.X + 225, mainPos.Y + 30), 0.6f, Color.White, Font.Pricedown, false);
            lName.UseWordWrap(380, 50);
            lName.SetAlignment(Label.Alignment.CENTER);
            lMission = new Label("", new Point(mainPos.X + 30, mainPos.Y + 100), 0.4f, Color.White, Font.ChaletComprimeCologne, false);
            lMission.UseWordWrap(390, 500);

            acceptButton = new Button(mainPos.X + 25, mainPos.Y + 625, 187, 50, Color.Black, 100, "Accept", OnAcceptClick);//Accept
            declineButton = new Button(mainPos.X + 238, mainPos.Y + 625, 187, 50, Color.Black, 100, "Decline", OnDeclineClick); //Decline
            buttons = new List<Button> { acceptButton, declineButton };
        }
예제 #3
0
 public void SetLabel(string txt, float sc, Color c, Font f)
 {
     label = new Label(txt, new Point(OriginalPos.X+ OrigionalSize.Width/2, OriginalPos.Y+5), sc, c, f, false);
     label.SetAlignment(Label.Alignment.CENTER);
 }