/*
    <CloneTheClassics.com>
    Copyright (C) <2008>  <http://cloningtheclassics.com>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

import pulpcore.Stage;
import pulpcore.scene.Scene2D;
import pulpcore.image.CoreImage;
import pulpcore.sprite.FilledSprite;
import pulpcore.sprite.ImageSprite;
import static pulpcore.image.Colors.*;

public class HelloWorld extends Scene2D
{
	public void load()
	{
		//Create a solid fill colored background
		FilledSprite background = new FilledSprite(WHITE);
		add(background);
		
		//Create a sprite for the logo
		int x = Stage.getWidth() / 2;
		int y = Stage.getHeight() / 2;
		ImageSprite logo = new ImageSprite(CoreImage.load("logo.png"), x, y);
		logo.setAnchor(ImageSprite.CENTER);
		
		//Add the background first and then the logo
		//Sprite's are rendered in the order they are added
		add(background);
		add(logo);
	}
}
