OnMouseMove gives wrong Y on classic amiga

Report any Hollywood bugs here
Post Reply
peceha
Posts: 111
Joined: Tue Dec 13, 2016 8:39 am
Location: Poland

OnMouseMove gives wrong Y on classic amiga

Post by peceha »

Hi,

please run that script on PC (all is working fine) and classic amiga (wb3.1 in my case - there is an offset to Y position given by OnMouseMove)

To see something going on you have to start clicking inside the window - that clicking will create points under the coursor (on PC but not on amiga).
Observe the window title for coordinates returned by OnMouseMove

Code: Select all

mx=0
my=0

Function p_HandlerFunc(msg)
	if msg.action="OnMouseDown"
		setTitle(mx..":"..my)
		plot(mx,my,#WHITE)
	endif
	if msg.action="OnMouseMove"
			mx=msg.x
			my=msg.y
	endif
EndFunction

InstallEventHandler({
	OnMouseDown=p_HandlerFunc,
	OnMouseMove=p_HandlerFunc
})

Repeat
	WaitEvent
Forever
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: OnMouseMove gives wrong Y on classic amiga

Post by airsoftsoftwair »

Right, but this isn't a Hollywood bug but a bug in Plananarama. It works correctly with Hollywood's inbuilt display handler but as soon as Plananarama is active, it doesn't work so this needs to be fixed in Plananarama.
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: OnMouseMove gives wrong Y on classic amiga

Post by airsoftsoftwair »

Code: Select all

- Fix: Y mouse position offset returned to Hollywood scripts was often shifted down by the window's
  top border height
Post Reply