mr.gedo
Member
Hello Everyone
I try click event for OverlayWindow but nothing happens
when try OverlayButton click event work fine but OverlayButton does not have a touch event so i can't move it
this is the code
what's the problem exactly ?
I try click event for OverlayWindow but nothing happens
when try OverlayButton click event work fine but OverlayButton does not have a touch event so i can't move it
this is the code
B4X:
Sub Process_Globals
Dim OW As OverlayWindow
End Sub
Sub Service_Create
CreateInterface
End Sub
Sub CreateInterface
OW.Initialize(10dip, 10dip, 55dip , 55dip, "Pnl")
Dim Pnl As Button = OW.Panel
Pnl.SetBackgroundImage(LoadBitmap(File.DirAssets, "home.png"))
OW.Open
End Sub
Sub Pnl_Touch(Action As Int, X As Float, Y As Float, ScreenX As Float, ScreenY As Float)
'Log(Action & " " & X & "," & Y & " " & ScreenX & "," & ScreenY)
If Action = 0 Then 'DOWN
InitialPosX = ScreenX - OW.X
InitialPosY = ScreenY - OW.Y
Else If Action = 2 Then 'MOVE
'Moves the window
'OW.SetPosition(ScreenX - InitialPosX, ScreenY - InitialPosY)
OW.SetPosition(ScreenX - InitialPosX, ScreenY - InitialPosY)
End If
End Sub
Sub Pnl_Click
ToastMessageShow("Home",True)
End Sub
what's the problem exactly ?