Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,173 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Position Cursor DLL #170770
12/03/07 10:09
12/03/07 10:09
Joined: Jul 2006
Posts: 503
Australia
A
adoado Offline OP

User
adoado  Offline OP

User
A

Joined: Jul 2006
Posts: 503
Australia
Hello all

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

Here is the link,
http://www.megaupload.com/?d=TQL4HTFP

Enjoy

Thanks,
Adoado


Visit our development blog: http://yellloh.com
Re: Position Cursor DLL [Re: adoado] #170771
01/27/08 21:54
01/27/08 21:54
Joined: Mar 2002
Posts: 580
San Francisco
clone45 Offline
User
clone45  Offline
User

Joined: Mar 2002
Posts: 580
San Francisco
adoado,

This .dll is exactly what I need, but it seems to crash in A7 using lite-c. Has anyone been successful in using this .dll in lite-c?

Thanks!
- Bret

Re: Position Cursor DLL [Re: clone45] #170772
01/28/08 10:22
01/28/08 10:22
Joined: Aug 2005
Posts: 1,012
germany, dresden
ulf Offline
Serious User
ulf  Offline
Serious User

Joined: Aug 2005
Posts: 1,012
germany, dresden
correct me if i'm wrong but can't you set the mouse position directly with the

mouse_pos.x
mouse_pos.y

variables?

Re: Position Cursor DLL [Re: ulf] #170773
01/28/08 10:37
01/28/08 10:37

A
Anonymous
Unregistered
Anonymous
Unregistered
A



He means the screen cursor (mouse_cursor in GS).
This have to be set with a Windows Function.

In lite-c you should be able to use SetCursorPos somehow.

Re: Position Cursor DLL [Re: ulf] #170774
01/28/08 10:40
01/28/08 10:40
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline
Expert
Joozey  Offline
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
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/08 10:41.

Click and join the 3dgs irc community!
Room: #3dgs
Re: Position Cursor DLL [Re: clone45] #170775
01/28/08 10:48
01/28/08 10:48

A
Anonymous
Unregistered
Anonymous
Unregistered
A



With lite-c it's very easy without any dll:

add
#include <windows.h>;

and just use the API function:
SetCursorPos(5,5);

have fun, mercuryus

Re: Position Cursor DLL [Re: ] #170776
01/28/08 14:01
01/28/08 14:01
Joined: Feb 2007
Posts: 50
I
iuselitec Offline
Junior Member
iuselitec  Offline
Junior Member
I

Joined: Feb 2007
Posts: 50
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?

Re: Position Cursor DLL [Re: iuselitec] #170777
01/28/08 14:21
01/28/08 14:21

A
Anonymous
Unregistered
Anonymous
Unregistered
A



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.

A reference of the windows api can be found here.

No example for clipping the cursor - but it's easy...

mercuryus

Re: Position Cursor DLL [Re: ] #170778
01/28/08 16:08
01/28/08 16:08
Joined: Mar 2002
Posts: 580
San Francisco
clone45 Offline
User
clone45  Offline
User

Joined: Mar 2002
Posts: 580
San Francisco
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/08 12:29
01/29/08 12:29
Joined: Jul 2006
Posts: 503
Australia
A
adoado Offline OP

User
adoado  Offline OP

User
A

Joined: Jul 2006
Posts: 503
Australia
Haven't checked this post for a while, didn't see all these comments ^^

I can change the DLL into Lite-C if necessary (but it appears not)

Thanks,
Adoado


Visit our development blog: http://yellloh.com
Page 1 of 2 1 2

Moderated by  adoado, checkbutton, mk_1, Perro 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1