Beispiel #1
0
 public void updateTurnButton()
 {
     if (logic.getTurn() == SIDE.DWARF)
     {
         turnButton.setImage("Images\\turndwarf.png");
         turnButton.setImageActive("Images\\turndwarf_a.png");
     }
     else
     {
         turnButton.setImage("Images\\turntroll.png");
         turnButton.setImageActive("Images\\turntroll_a.png");
     }
 }
Beispiel #2
0
        private void createGUI()
        {
            GuiButton stopButton = new GuiButton(890, 870);

            stopButton.OnClickEvent += new GuiButton.ClickEventHandler(stopButton_OnClickEvent);
            this.addActor(stopButton);

            turnButton = new GuiButton(890, 10);
            turnButton.OnClickEvent += new GuiButton.ClickEventHandler(turnButton_OnClickEvent);
            turnButton.setImage("Images\\turndwarf.png");
            turnButton.setImageActive("Images\\turndwarf_a.png");
            this.addActor(turnButton);

            GuiButton dwarf = new GuiButton(20, 0);

            dwarf.receivesInput(false);
            dwarf.setImage("Images\\dwarf.png");
            this.addActor(dwarf);

            GuiButton troll = new GuiButton(20, 70);

            troll.receivesInput(false);
            troll.setImage("Images\\troll.png");
            this.addActor(troll);

            dwarfScore = new GuiText(90, 0);
            dwarfScore.setText("32");
            this.addActor(dwarfScore);

            trollScore = new GuiText(90, 70);
            trollScore.setText("32");
            this.addActor(trollScore);
        }