OnMouseMove not working with a Hollywood Display in RapaGUI 2.0 (Android)

Report any Hollywood bugs here
Post Reply
PEB
Posts: 567
Joined: Sun Feb 21, 2010 1:28 am

OnMouseMove not working with a Hollywood Display in RapaGUI 2.0 (Android)

Post by PEB »

If you run the following code on the new Android player, two displays will open; but it will only work on the Hollywood display (not when the RapaGUI display is active):

Code: Select all

@REQUIRE "RapaGUI"
@REQUIRE "polybios"
@DISPLAY {Width = 640, Height = 480, Color = #BLACK, Layers=True}

TextOut(10, 10, "Mouse Position:", {Name="Text"})

Function p_UpdatePos(msg)
	SetLayerStyle("Text", {Text="Mouse Position:\nX="..msg.x.."\nY="..msg.y..""})
EndFunction

AppGUI$=[[<application id="app">
	<window id="Main" closegadget="true">
		<vgroup frame="true">
			<hollywood FixWidth="false" FixHeight="false" display="1"/>
		</vgroup>
	</window>
</application>]]
moai.CreateApp(AppGUI$)

InstallEventHandler({OnMouseMove=p_UpdatePos})

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

Re: OnMouseMove not working with a Hollywood Display in RapaGUI 2.0 (Android)

Post by airsoftsoftwair »

Right, I can reproduce this here. Will be fixed.
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: OnMouseMove not working with a Hollywood Display in RapaGUI 2.0 (Android)

Post by airsoftsoftwair »

Ok, so that's a feature, not a bug, the desktop version behaves the same. As soon as a Hollywood display is open, Hollywood will try to get the mouse positions from it instead of from the child. This is why you won't be able to obtain mouse positions from a display embedded inside a GUI if the parent Hollywood display is open as well. So as a rule of thumb, just keep the parent Hollywood display hidden and there won't be any problems.
User avatar
Clyde
Posts: 348
Joined: Sun Feb 14, 2010 12:38 pm
Location: Dresden / Germany

Re: OnMouseMove not working with a Hollywood Display in RapaGUI 2.0 (Android)

Post by Clyde »

Could this be the same problem with include order of RapaGUI described here? -> viewtopic.php?f=10&t=2057
Currently using: Hollywood 9 with Windows IDE and Hollywood 9 with Visual Studio Code and hw4vsc
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: OnMouseMove not working with a Hollywood Display in RapaGUI 2.0 (Android)

Post by airsoftsoftwair »

No, that was a different issue that has been fixed now.
Post Reply