The following code (based upon the "AlphaApple" Hollywood example script) demonstrates this problem (not on Amiga, but on Windows):
Code: Select all
@BGPIC 1, "appleimg.png", {LoadAlpha = True}
@MENU 1, {{"Test", {{"Test", ID = "Test"}}}}
@DISPLAY {Borderless = True, DragRegion = {{X = 0, Y = 0, Width = 528, Height = 535}}, Menu = 1}
EscapeQuit(True)
EnableLayers()
CreateBrush(1, 50, 50)
DisplayBrush(1, #CENTER, #CENTER, {Name="Button"})
Function p_ButtonFunc(msg)
Switch msg.action
Case "OnMouseOver"
SetLayerStyle("Text", {Text="Over"})
Case "OnMouseOut"
SetLayerStyle("Text", {Text="Out"})
EndSwitch
EndFunction
Button$={OnMouseOver=p_ButtonFunc, OnMouseOut=p_ButtonFunc}
MakeButton(1, #LAYERBUTTON, "Button", False, True, Button$)
TextOut(#CENTER, #CENTER, "", {Name="Text", AnchorX=0.5})
Repeat
WaitEvent
Forever
If the button area needs to be shifted down because of the menu, then the button image should also be shifted down (so they match). However, if it would be possible for the button area not to shift down, I think that would be preferable.