You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
zweiundvierzig/Start_Load.java

47 lines
1.2 KiB
Java

9 years ago
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Beginnt neues Spiel/ lädt altes Spiel.
*
* @author 4ngelica
* @version 1.0
*/
public class Start_Load extends World implements ButtonEvent
9 years ago
{
static String backgroundImage = "backgroundLight.png"; // Gibt an, welches Bild in allen Menüs als Hintergrund gewählt werden soll.
// Light Theme: "backgroundLight.png"
// Dark Theme: "backgroundDark.png"
Button chulien = new Button("Neues Spiel", 16 , this);
9 years ago
/**
* Constructor for objects of class Start_Load.
*
*/
public Start_Load()
{
// Create a new world with 600x400 cells with a cell size of 1x1 pixels.
super(1600, 900, 1);
setBackground(backgroundImage);
chulien.setSize(100,50);
addObject (chulien, (1600-chulien.getWidth())/2, (900-chulien.getHeight())/2);
}
public void buttonClicked ( Button b)
{
if ( b == chulien)
{
World chean = new Colours (1600, 900, 1);
Greenfoot.setWorld(chean);
}
}
public void Load()
{
}
9 years ago
}