'Activity module
Sub Process_Globals
Dim splashtimer As Timer
End Sub
Sub Globals
Dim logo As Bitmap
Dim mainbmp As Bitmap
Dim Canvas1 As Canvas
Dim Rect As Rect
Dim lv As LayoutValues
Dim xc As Float
Dim yc As Float
End Sub
Sub Activity_Create(FirstTime As Boolean)
Canvas1.Initialize(Activity)
logo.Initialize(File.DirAssets, "logo.bmp")
mainbmp.Initialize(File.DirAssets, "main.bmp")
splashtimer.Initialize("splashtimer",1000)
Rect.Initialize(0, 0, 0, 0)
lv=GetDeviceLayoutValues
yc=lv.height/480
xc=lv.Width/800
If FirstTime Then
Rect.Top = 150*yc
Rect.Left = 275*xc
Rect.Bottom = 330*yc
Rect.Right = 525*xc
Canvas1.DrawBitmapRotated(logo, Null, Rect, 0)
End If
' mainscreen(5)
End Sub
Sub Activity_Resume
splashtimer.enabled = True
End Sub
Sub Activity_Pause (UserClosed As Boolean)
splashtimer.enabled = False
End Sub
Sub splashtimer_tick
Rect.Top = 0*yc 'playfield
Rect.Left = 200*xc
Rect.Bottom = 20*yc
Rect.Right = 220*xc
Canvas1.DrawBitmapRotated(mainbmp, Null, Rect, 0)
mainscreen(5)
End Sub
Sub mainscreen(nombre As Short)
Rect.Top = 20*yc 'playfield
Rect.Left = 200*xc
Rect.Bottom = 420*yc
Rect.Right = 600*xc
Canvas1.DrawBitmapRotated(mainbmp, Null, Rect, 0)
End Sub