Hello, I have a problem. I make a code that changes the color of a GreenfootImage if the mouse goes over it but the code doesn't seem to detect my mouse no matter what. I can't figure out what's wrong.
public void act(){ if((mouse != null) && (!(Greenfoot.mouseMoved(null)))){ if(((mouse.getX() > 100) && (mouse.getX() < 200)) && ((mouse.getY() > 300) && (mouse.getY() < 350))){ BA_cursus.clear(); getBackground().drawImage(BA_cursus_C, 100, 300); }else{ BA_cursus_C.clear(); getBackground().drawImage(BA_cursus, 100, 300); } } }