This site requires JavaScript, please enable it in your browser!
Greenfoot back
BrownBoii333
BrownBoii333 wrote ...

2015/1/23

Setting paint order

BrownBoii333 BrownBoii333

2015/1/23

#
Hi I want to set the paint order of an image rather than a class .(this images are both in the same class). How do I do this? import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) /** * Write a description of class Intro here. * * @author (your name) * @version (a version number or a date) */ public class Intro extends Actor { public static GreenfootImage img2 = new GreenfootImage("Changebutton.png"); public static GreenfootImage img1 = new GreenfootImage("Instuctions.png"); public Intro(String Image) { setImage(Image); } public void act() { if(Greenfoot.mouseClicked(this)&&getY()<250) { getWorld().removeObject(this); } } }
danpost danpost

2015/1/24

#
There is (at least, at the moment) a work-around to that. Add the one you want painted on top of the other into the world last.
You need to login to post a reply.