im using the AppGameKit player i got from the download page after a purchased it. here is the code:
//boolean values
global true = 1
global false = 0
//setup =====================================================================================================
//app setup and value gather
SetDisplayAspect( 10.0/16.0 )
setvirtualresolution (200, 320)
setclearcolor (4, 4, 4) //245, 245, 220
setprintcolor (0, 0, 0)
width = getvirtualwidth()
height = getvirtualheight()
setorientationallowed (1, 0, 0, 0)
background = createsprite (loadimage ("background.png"))
setspriteposition (background, 0, 0)
setspritesize (background, getvirtualwidth(), getvirtualheight())
logo = createsprite (loadimage ("logo.png"))
setspriteposition (logo, width*0.55, height*0.65)
setspritesize (logo, width*0.4, height*0.25)
//text setup
title = createtext("Overtime Assistant")
settextsize (title, 15)
settextcolor (title, 0, 0, 0, 255)
settextposition (title, (width / 2) - (gettexttotalwidth(title)/2), 10)
global day
global month
global year
day = floor (val (right (getcurrentdate(), 2)))
month = floor (val (right (left (getcurrentdate(), 7), 2)))
year = floor (val (left (getcurrentdate(), 4)))
if day = 0 then day = 1
if month = 0 then month = 1
if year = 0 then year = 2013
global hour = 0
global min = 0
daytext = createtext (str (day))
monthtext = createtext (str (month))
yeartext = createtext (str (year))
hourtext = createtext ("0")
mintext = createtext ("00")
settextcolor (daytext, 0, 0, 0, 255)
settextcolor (monthtext, 0, 0, 0, 255)
settextcolor (yeartext, 0, 0, 0, 255)
settextcolor (hourtext, 0, 0, 0, 255)
settextcolor (mintext, 0, 0, 0, 255)
settextsize (daytext, 15)
settextsize (monthtext, 15)
settextsize (yeartext, 15)
settextsize (hourtext, 25)
settextsize (mintext, 25)
settextposition (daytext, width*0.15 - gettexttotalwidth(daytext)/ 2, 80)
settextposition (monthtext, width*0.35 - gettexttotalwidth(monthtext)*0.5, 80)
settextposition (yeartext, width*0.65 - gettexttotalwidth(yeartext)*0.5, 80)
settextposition (hourtext, width*0.3 - gettexttotalwidth(hourtext)*0.5, 130)
settextposition (mintext, width*0.6 - gettexttotalwidth(mintext)*0.5, 130)
daytext2 = createtext ("Day")
monthtext2 = createtext ("Month")
yeartext2 = createtext ("Year")
hourtext2 = createtext ("Hours")
mintext2 = createtext ("Minutes")
settextcolor (daytext2, 0, 0, 0, 255)
settextcolor (monthtext2, 0, 0, 0, 255)
settextcolor (yeartext2, 0, 0, 0, 255)
settextcolor (hourtext2, 0, 0, 0, 255)
settextcolor (mintext2, 0, 0, 0, 255)
settextsize (daytext2, 10)
settextsize (monthtext2, 10)
settextsize (yeartext2, 10)
settextsize (hourtext2, 10)
settextsize (mintext2, 10)
settextposition (daytext2, (gettextx (daytext) + gettexttotalwidth (daytext) / 2) - (gettexttotalwidth (daytext2) / 2), 60)
settextposition (monthtext2, (gettextx (monthtext) + gettexttotalwidth (monthtext) / 2) - (gettexttotalwidth (monthtext2) / 2), 60)
settextposition (yeartext2, (gettextx (yeartext) + gettexttotalwidth (yeartext) / 2) - (gettexttotalwidth (yeartext2) / 2), 60)
settextposition (hourtext2, (gettextx (hourtext) + gettexttotalwidth (hourtext) / 2) - (gettexttotalwidth (hourtext2) / 2), 110)
settextposition (mintext2, (gettextx (mintext) + gettexttotalwidth (mintext) / 2) - (gettexttotalwidth (mintext2) / 2), 110)
//button setup
addvirtualbutton (1, gettextx (daytext) + gettexttotalwidth (daytext) + 15, gettexty (daytext), 12)
addvirtualbutton (2, gettextx (daytext) + gettexttotalwidth (daytext) + 15, gettexty (daytext) + gettexttotalheight (daytext), 12)
addvirtualbutton (3, gettextx (monthtext) + gettexttotalwidth (monthtext) + 15, gettexty (monthtext), 12)
addvirtualbutton (4, gettextx (monthtext) + gettexttotalwidth (monthtext) + 15, gettexty (monthtext) + gettexttotalheight (monthtext), 12)
addvirtualbutton (5, gettextx (yeartext) + gettexttotalwidth (yeartext) + 15, gettexty (yeartext), 12)
addvirtualbutton (6, gettextx (yeartext) + gettexttotalwidth (yeartext) + 15, gettexty (yeartext) + gettexttotalheight (yeartext), 12)
addvirtualbutton (7, gettextx (hourtext) + gettexttotalwidth (hourtext) + 15, gettexty (hourtext), 12)
addvirtualbutton (8, gettextx (hourtext) + gettexttotalwidth (hourtext) + 15, gettexty (hourtext) + gettexttotalheight (hourtext), 12)
addvirtualbutton (9, gettextx (mintext) + gettexttotalwidth (mintext) + 19, gettexty (mintext), 12)
addvirtualbutton (10, gettextx (mintext) + gettexttotalwidth (mintext) + 19, gettexty (mintext) + gettexttotalheight (mintext), 12)
addlistpic1 = loadimage ("AddToList.png")
addlistpic2 = loadimage ("AddToList2.png")
addlistbutton = createsprite (addlistpic1)
setspriteposition (addlistbutton, width*0.04, height*0.75)
setspritesize (addlistbutton, width*0.4, height*0.13)
//other setup
global starttime as float
global time as float
global timepassed as float
tempstr$ = ""
do
if getvirtualbuttonpressed(1) = 1
daychange (1)
settextstring (daytext, str (day))
endif
if getvirtualbuttonpressed(2) = 1
daychange (0)
settextstring (daytext, str (day))
endif
if getvirtualbuttonpressed(3) = 1
month = month + 1
if month = 13
month = 1
endif
daycheck ( )
settextstring (monthtext, str (month))
settextstring (daytext, str (day))
endif
if getvirtualbuttonpressed(4) = 1
month = month - 1
if month = 0
month = 12
endif
daycheck ( )
settextstring (monthtext, str (month))
settextstring (daytext, str (day))
endif
if getvirtualbuttonpressed(5) = 1
year = year + 1
daycheck ( )
settextstring (yeartext, str (year))
settextstring (daytext, str (day))
endif
if getvirtualbuttonpressed(6) = 1
year = year - 1
daycheck ( )
settextstring (yeartext, str (year))
settextstring (daytext, str (day))
endif
if getvirtualbuttonpressed(7) = 1
hour = hour + 1
settextstring (hourtext, str (hour))
endif
if getvirtualbuttonpressed(8) = 1
if hour > 0
hour = hour - 1
settextstring (hourtext, str (hour))
endif
endif
if getvirtualbuttonpressed(9) = 1
min = min + 30
if min = 60
min = 0
hour = hour + 1
settextstring (mintext, str (min) + "0")
settextstring (hourtext, str (hour))
else
settextstring (mintext, str (min))
endif
endif
if getvirtualbuttonpressed(10) = 1
if hour => 1
min = min - 30
if min = -30
min = 30
hour = hour - 1
settextstring (mintext, str (min))
settextstring (hourtext, str (hour))
else
settextstring (mintext, str (min) + "0")
endif
elseif min = 30
min = 0
settextstring (mintext, str (min) + "0")
endif
endif
if getpointerpressed() = 1 and getpointerx() => getspritex(addlistbutton) and getpointery() => getspritey(addlistbutton) and getpointerx() =< (getspritex(addlistbutton) + getspritewidth(addlistbutton)) and getpointery() =< (getspritey(addlistbutton) + getspriteheight(addlistbutton))
setspriteimage (addlistbutton, addlistpic2)
sync ()
wait (1)
setspriteimage (addlistbutton, addlistpic1)
sync ()
endif
Sync()
loop
function daychange (up)
if month = 1 or month = 3 or month = 5 or month = 7 or month = 8 or month = 10 or month = 12
if up = false
day = day - 1
if day < 1
day = 31
endif
elseif up = true
day = day + 1
if day > 31
day = 1
endif
endif
elseif month = 2
if up = false
day = day - 1
if day < 1
day = 28 + getleapyear (year)
endif
elseif up = true
day = day + 1
if day > (28 + getleapyear (year))
day = 1
endif
endif
elseif month = 4 or month = 6 or month = 9 or month = 11
if up = false
day = day - 1
if day < 1
day = 30
endif
elseif up = true
day = day + 1
if day > 30
day = 1
endif
endif
endif
endfunction ()
function daycheck ()
if month = 1 or month = 3 or month = 5 or month = 7 or month = 8 or month = 10 or month = 12
if day > 31
day = 31
endif
elseif month = 2
if day > (28 + getleapyear (year))
day = 28 + getleapyear (year)
endif
elseif month = 4 or month = 6 or month = 9 or month = 11
if day > 30
day = 30
endif
endif
endfunction ()
function wait (time)
starttime = timer()
timepassed = 0
while time < timepassed
timepassed = Timer() - starttime
endwhile
endfunction ()
I'm not brilliant, it works on the computer, but it wont broadcast to android devices properly. The wait function at the end needs touching up, but I'm on that.