I just thought I would release this DLL to the public. It is nothing fancy, it just positions the screen cursor at a user defined location, something not possible in native 3dgs C-script.
It was made for C-script, but I guess it should work in Lite-C
No, if your cursor is halfway the screen and put your mouse_pos at zero, you can't move further than halfway the screen, because your real cursor will be outside the screenborders if you did. And there are more issues such as clicking (I think).
Last edited by Joozey; 01/28/0810:41.
Click and join the 3dgs irc community! Room: #3dgs
Re: Position Cursor DLL
[Re: clone45]
#170775 01/28/0810:4801/28/0810:48
thanks! i didnīt know about SetCursorPos(). could this be used to limit the mouse cursor to the engine window? is there also a GetCursorPos()? could you post an example which does this?
You can limit the mouse cursor with lite-c by using ClipCursor and the Engine window properties (pos/size). All these and many other function are defined in windows.h.
Wow .. windows.h! No doubt I'll find all sorts of goodies in there! Thanks for the responses. Just in case you are curious, in my game the mouse is normally active. Holding down the right mouse button goes into "move mode" and controls the entity's pan. Releasing the right mouse button changes back to mouse mode. The problem was that, after exiting move mode, my mouse pointer needs to get re-centered. Hopefully your advice will solve this issue. I think that those controls are somewhat like World of Warcraft, but it's been too long for me to remember.
Thanks! - Bret
Re: Position Cursor DLL
[Re: clone45]
#170779 01/29/0812:2901/29/0812:29