Ejemplo n.º 1
0
 public HeroPowerPortret(HeroPortret p)
 {
     parent = p;
     center = parent.center;
     parent.Controls.Add(this);
     MouseUp += HeroPowerPortret_MouseUp;
 }
Ejemplo n.º 2
0
        public static Point DefaultLocation(HeroPortret portret)
        {
            int y;

            if (portret.IsA)
            {
                y = DBoarder;
            }
            else
            {
                y = portret.Parent.Height - portret.Height - DBoarder - 30;
            }

            int x = portret.Parent.Width - portret.Width - DBoarder;

            return(new Point(x, y));
        }
Ejemplo n.º 3
0
        public ControlCenter(GameInstance g, GamingForm f)
        {
            parent  = f;
            game    = g;
            g.Input = GetInput;

            InvokeRebuild = () => parent.Invoke((Action)ReBuild);
            Input         = (p) =>
            {
                parent.Invoke(InvokeRebuild);
                return(true);
            };

            endButt = new EndTurnButton(this);
            HeroA   = new HeroPortret(this, true);
            HeroB   = new HeroPortret(this, false);
            AHand   = new HandControl(this, true);
            BHand   = new HandControl(this, false);
            boardC  = new BoardControl(this);
        }
Ejemplo n.º 4
0
        public GamingForm(GameInstance g)
        {
            CheckForIllegalCrossThreadCalls = false;
            KeyPreview      = true;
            StartPosition   = FormStartPosition.CenterScreen;
            FormBorderStyle = FormBorderStyle.FixedToolWindow;

            Size = new Size(1300, 700);

            center = new ControlCenter(g, this);

            center.boardC.Location = BoardControl.StdLocation(center.boardC);

            center.HeroA.Location = HeroPortret.DefaultLocation(center.HeroA);
            center.HeroB.Location = HeroPortret.DefaultLocation(center.HeroB);

            center.AHand.Location = HandControl.StdLocation(center.AHand, false);
            center.BHand.Location = HandControl.StdLocation(center.BHand, true);

            center.endButt.Location = EndTurnButton.StdLocation(center.endButt);

            Load += StdForm_Load;
        }