Пример #1
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 };
        }
Пример #2
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);
 }