Ejemplo n.º 1
0
        public Loop(Form1 f)
        {
            this.f = f;
            this.buffer = new Bitmap(f.getPanelWidth(), f.getPanelWidth());

            drawManager = new DrawManager();
            guiManager = new GuiManager(this, drawManager);
        }
Ejemplo n.º 2
0
 public InGameLabel(GuiManager guiManager, int priority)
     : base(guiManager, priority)
 {
     this.setBounds(new Rectangle(200, 600, 600, 100));
     label = new GuiLabel(0, this);
     label.setBounds(new Rectangle(220, 620, 560, 60));
     this.addComponent(label);
 }
Ejemplo n.º 3
0
 public Gui(GuiManager guiManager, int priority)
     : base(priority)
 {
     this.guiManager = guiManager;
 }
Ejemplo n.º 4
0
        public Options(GuiManager guimanager)
            : base(guimanager)
        {
            this.setBounds(new Rectangle(0, 0, 1024, 768));
            this.setBackground(new Bitmap("../bg.bmp"));

            GuiButton startB = new GuiButton(6,this);
            GuiButton endB = new GuiButton(7, this);

            GuiLabel player1L = new GuiLabel(-1,this);
            GuiLabel player2L = new GuiLabel(-1, this);
            GuiLabel sizeL = new GuiLabel(-1,this);

            player1RG = new GuiRadioButtonGroup();
            GuiRadioButton human1R = new GuiRadioButton(0, this);
            GuiRadioButton ki1R = new GuiRadioButton(1, this);
            player1RG.addRadioButton(human1R);
            player1RG.addRadioButton(ki1R);

            player2RG = new GuiRadioButtonGroup();
            GuiRadioButton human2R = new GuiRadioButton(2, this);
            GuiRadioButton ki2R = new GuiRadioButton(3, this);
            player2RG.addRadioButton(human2R);
            player2RG.addRadioButton(ki2R);

            sizeRG = new GuiRadioButtonGroup();
            GuiRadioButton size8R = new GuiRadioButton(4, this);
            GuiRadioButton size10R = new GuiRadioButton(5, this);
            sizeRG.addRadioButton(size8R);
            sizeRG.addRadioButton(size10R);

            startB.setBounds(new Rectangle(100,5,300,100));
            startB.setImage(new Bitmap("../go.bmp"));
            startB.setText("Start Game");
            this.addComponent(startB);

            endB.setBounds(new Rectangle(100,300,300,100));
            endB.setImage(new Bitmap("../end.bmp"));
            endB.setText("End Game");
            this.addComponent(endB);

            player1L.setBounds(new Rectangle(100, 110, 200, 100));
            player1L.setColor(Color.Blue);
            player1L.setText("P l a y e r   1");
            this.addComponent(player1L);

            player2L.setBounds(new Rectangle(300, 110, 200, 100));
            player2L.setColor(Color.Red);
            player2L.setText("P l a y e r   2 ");
            this.addComponent(player2L);

            sizeL.setBounds(new Rectangle(140, 240, 200, 100));
            sizeL.setText("S i z e   o f   t h e   f i e l d");
            this.addComponent(sizeL);

            human1R.setBounds(new Rectangle(100,150,100,20));
            human1R.setText("H u m a n   P l a y e r");
            ki1R.setBounds(new Rectangle(100, 180, 100, 20));
            ki1R.setText("C o m p u t e r");
            this.addComponent(human1R);
            this.addComponent(ki1R);

            human2R.setBounds(new Rectangle(300, 150, 100, 20));
            human2R.setText("H u m a n   P l a y e r");
            ki2R.setBounds(new Rectangle(300, 180, 100, 20));
            ki2R.setText("C o m p u t e r");
            this.addComponent(human2R);
            this.addComponent(ki2R);

            size8R.setBounds(new Rectangle(100, 270, 100, 20));
            size8R.setText("8 x 8");
            size10R.setBounds(new Rectangle(300, 270, 100, 20));
            size10R.setText("10 x 10");
            this.addComponent(size8R);
            this.addComponent(size10R);

            player1RG.activateButton(human1R.getID());
            player2RG.activateButton(ki2R.getID());
            sizeRG.activateButton(size8R.getID());
        }
Ejemplo n.º 5
0
 public Gui(GuiManager guiManager)
     : base(1)
 {
     this.guiManager = guiManager;
 }