Button Detection using RapaGUI with FitScale and KeepProportions

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

Button Detection using RapaGUI with FitScale and KeepProportions

Post by PEB »

There seems to be a problem with buttons being detected in the correct location when using RapaGUI with Fitscale and KeepProportions set to "True." The vertical placement seems to be correct, but the horizontal placement is wrong. (The same problem shows up whether #LAYERBUTTON or #SIMPLEBUTTON is used.)

Code: Select all

@REQUIRE "RapaGUI"
@DISPLAY {Color=#WHITE, Layers=True, Width=800, Height=600, ScaleMode=#SCALEMODE_LAYER, FitScale=True, KeepProportions=True, Hidden=False}

moai.CreateApp([[<application id="app">
	<window id="Main" Title="Test" closegadget="true" open="true">
		<vgroup>
			<hollywood display="1"/>
		</vgroup>
	</window>
</application>]])

Function p_TestButtonFunc(msg)
	Switch msg.action
	Case "OnMouseOver":
		DebugPrint("Over")
	Case "OnMouseOut":
		DebugPrint("Out")
	EndSwitch
EndFunction
TestButtonTable={OnMouseOver=p_TestButtonFunc, OnMouseOut=p_TestButtonFunc}
SetFillStyle(#FILLCOLOR)
Box(20, #CENTER, 200, 200, #RED, {Name="Test"})
MakeButton(1, #LAYERBUTTON, "Test", TestButtonTable)
;MakeButton(1, #SIMPLEBUTTON, 20, #CENTER, 200, 200, TestButtonTable)

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

Re: Button Detection using RapaGUI with FitScale and KeepProportions

Post by airsoftsoftwair »

True, I can reproduce this. Will be fixed.
Post Reply