c# - Custom cursor in XNA 4.0 -
so i've been following answer: adding custom cursor in xna/c#?
... custom mouse cursor working on xna.
i've done solution, no error, still no custom cursor (it still shows windows default one).
i'm unsure on really...
i created getcursorpos method @ bottom of game1.cs file, included following declarations @ begining of game1 class:
private mousestate mousestate; private int cursorx; private int cursory;
the code in loadcontent giving me error:
cursortex = content.load<texture2d>("cursor.png");
so replaced with:
cursortex = content.load<texture2d>("cursor");
("cursor" png)
what doing wrong?... said, no error :(
i suspect need update mouse's position, using mousestate = mouse.getstate();
(put in game's update method, before update cursorpos
variable).
Comments
Post a Comment