Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,631 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
mouse_spot #292581
10/04/09 23:02
10/04/09 23:02
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline OP
Serious User
MrGuest  Offline OP
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
Hi,

I'm trying to change the mouse_map to a resize bmap when over the edge of a panel,

all successful until the mouse_map reaches 0,0 but the spot is at 24,24, meaning i'm unable to move the mouse high enough to click on the panels border,

is there anyway to get around this, or can something be implemented, for the mouse to reach a lower position than 0,0, or aligning the mouse_map so the mouse_spot is always the same as mouse_pos and offseting the image.

Many thanks
MrGuest

Re: mouse_spot [Re: MrGuest] #292608
10/05/09 08:56
10/05/09 08:56
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
Sure, just run a small function that adjusts the mouse_spot value dependent on in which direction the mouse moves.

Re: mouse_spot [Re: jcl] #292682
10/05/09 23:47
10/05/09 23:47
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline OP
Serious User
MrGuest  Offline OP
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
Hi, I think I may not of explained correctly

If I have create an image, then try rescaling from it's top, I use mouse_spot to do this, easy


But when the edge is already at the top I am unable to move the mouse higher to do this


Adjusting mouse_spot isn't the problem, it's changing it's boundaries which is the problem

Many thanks as always!
MrGuest

Re: mouse_spot [Re: MrGuest] #292736
10/06/09 13:37
10/06/09 13:37
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
The problem is that when you set mouse_spot to a nonzero value, it is not identical anymore with the Windows mouse spot, which is always at the upper left cornder of the pointer image. This means that the Windows mouse position can be already outside the panel when mouse_spot is still inside, and you can't click in that position.

For this reason I suggested to adjust mouse_spot dependent on the move direction. This is a workaround of course, and no real solution. I'll think over an engine fix for this.

Re: mouse_spot [Re: jcl] #292770
10/06/09 19:44
10/06/09 19:44
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline OP
Serious User
MrGuest  Offline OP
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
yeah workaround i'm using atm, is dragging a different bmap to the -mouse_spot position, and hiding the mouse_map

something similar would be good

Re: mouse_spot [Re: MrGuest] #350765
12/18/10 23:19
12/18/10 23:19
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline OP
Serious User
MrGuest  Offline OP
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
This problem has just arisen in another situation.

When creating a crosshair 64x64 the mouse_spot will obviously be 32x32.

If a mouse is clicked at a x or y position less than 32 on the screen position it will either click the border or activate the program behind it.

Moving the crosshair to a negative mouse_spot and having the mouse trigger it it's usual position will solve this.

Any chance of getting this implemented or is it time for another work around? grin

Re: mouse_spot [Re: MrGuest] #350835
12/19/10 15:55
12/19/10 15:55
Joined: Sep 2003
Posts: 929
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 929
You can avoid this problem when you not use the predefined mouse_map, but a panel that you move with the mouse, like this:

function bmap_mouse()
{
PANEL* mousepanel = pan_create(NULL,9999);
mousepanel.bmap = some_mousemap;
set(mousepanel,SHOW);
while(1) {
mousepanel.x = mouse_cursor.x + some_offset_x;
mousepanel.y = mouse_cursor.y + some_offset_y;
wait(1);
}
}

Then you can leave mouse_spot at zero and it should still work, try it.

Re: mouse_spot [Re: Spirit] #350877
12/19/10 22:29
12/19/10 22:29
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline OP
Serious User
MrGuest  Offline OP
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
Originally Posted By: Spirit
You can avoid this problem when you not use the predefined mouse_map, but a panel that you move with the mouse, like this:

function bmap_mouse()
{
PANEL* mousepanel = pan_create(NULL,9999);
mousepanel.bmap = some_mousemap;
set(mousepanel,SHOW);
while(1) {
mousepanel.x = mouse_cursor.x + some_offset_x;
mousepanel.y = mouse_cursor.y + some_offset_y;
wait(1);
}
}

Then you can leave mouse_spot at zero and it should still work, try it.
Thanks Spirit for this but I've already implemented pretty much that as said in previous posts laugh. What I'm asking for is to not have to use a work around for such a simple thing. It's obvious and been acknowledged there's a problem with using mouse_spot the way it is at the moment so wondering why it's still the way it is and not having it fixed when one could easily be implemented. laugh

Re: mouse_spot [Re: MrGuest] #350908
12/20/10 09:51
12/20/10 09:51
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
Yes, you certainly have a point. I'll put this on our priority list for the next update.

Re: mouse_spot [Re: jcl] #351013
12/20/10 23:53
12/20/10 23:53
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline OP
Serious User
MrGuest  Offline OP
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
Thanks JCL! grin


Moderated by  old_bill, Tobias 

Gamestudio download | 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