Monday 15 July 2013

slick2d - How to make a custom mouse cursor in Java?(Slick 2D) -



slick2d - How to make a custom mouse cursor in Java?(Slick 2D) -

hello i'm making game in slick2d , create custom cursor image it. know code , need set it.

package lame.game.j3; public class menu extends basicgamestate{ //what should set here? public menu(int state){ } public void init(gamecontainer gc, statebasedgame sbg) throws slickexception{ //what should set here? } public void render(gamecontainer gc, statebasedgame sbg, graphics g) throws slickexception{ //what should set here? } public void update(gamecontainer gc, statebasedgame sbg, int delta) throws slickexception{ //what should set here? } public int getid(){ homecoming 0; }

thanks!

see documentation gamecontainer.setmousecursor. want set in init(...) or in different class, "statebasedgame" or other game type created. depends on want cursor used (only in state, or whole game).

java slick2d

No comments:

Post a Comment