Hi guys, I'm using slick for about 2 years for my hobby project but not constantly.
I have a problem with correct setup of mouse cursor with TWL+Slick2D.
I have defined cursor in my theme:
Code:
<images file="cursor.png">
<cursor name="cursor1" hotSpotX="0" hotSpotY="0" xywh="*" imageRef="none"/>
</images>
Then i set it as default cursor to my "-defaults" theme, which is base for all other themes:
Code:
<param name="mouseCursor">
<cursor>cursor1</cursor>
</param>
But this has no effect. I'm using approach described in
TWL wiki.
Furthermore I've tried to setup cursor using slick api:
Code:
container.setMouseCursor("cursor.png",0,0);
Depending on where i place that code i get different results:
in init() method - cursor appears for about half a second, then default system cursor takes place.
in render() method - cursor switching between my cursor and system cursor.
in update() method - cursor stays default.
cursor.png and theme.xml are located in same folder. My skinned button works well, so it's not pathing problem, something with TWL not properly setting cursor from widget or something i guess.