'Activity module
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Type TouchArg(btn As Button, x As Float,y As Float,ACTION As Int)
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim Button1 As Button
Dim Button2 As Button
Dim dv(2) As DraggableView
Dim btn As Button
Dim PosX,PosY As Int 'Position der ausgeählte Karte
Dim timMsgbox As Timer
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("1")
dv(0).Initialize(Activity, Button1,"Main")
dv(1).Initialize(Activity, Button2,"Main")
'Timer for Msgbox
timMsgbox.Initialize("timMsgbox",100)
timMsgbox.Enabled=False
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Activity_Touch (Action As Int, X As Float, Y As Float)
Activity.Title = dv(1).left
End Sub
Sub pnlKarteTouch(TouchArg1 As TouchArg) As Boolean
Select TouchArg1.ACTION
Case Activity.ACTION_DOWN
btn=TouchArg1.btn
PosY=btn.top
PosX=btn.left
Case Activity.ACTION_MOVE
btn.BringToFront
Case Activity.ACTION_UP
goKarteAblage(TouchArg1.X,TouchArg1.Y)
End Select
Return True
End Sub
Sub goKarteAblage(mPosX As Float, mPosY As Float)
Log("mPosY=" & mPosY)
If mPosY> 70 Then
timMsgbox.Enabled=True
End If
End Sub
Sub timMsgbox_Tick
timMsgbox.Enabled=False
Msgbox2("Test1","Test1","OK","","",Null)
End Sub