
Originally Posted by
jasher0
I'm also interested in creating applications that draw to the phone's main screen.
I would hope the finished application, once installed from a SIS, would be run from the menu, and simply disappear -- except for drawing on the phone's main screen --
Topwindow seems to draw to the screen in some situations even when the application is in the background.
At least this seems to work. Upload it into your phone's \\python-directory, run it and switch it to background by pressing "application" key. "The counter" remains on the screen. Tested with E70. (BTW, there is no visible topwindow in E70 when keyboard is opened -> screen orientation is horizontal.)
Code:
import TopWindow
global splash
splash = TopWindow.TopWindow()
splash.size = (200,100)
splash.position = (5,100)
splash.shadow = 3
splash.visible = 1
splash.corner_type = 'corner2'
splash.background_color = 0xcccccc
splash.show()
import graphics
import e32
import appuifw
def splash_text(text):
im = graphics.Image.new((200,100))
im.text((5,90),text, 0x000000)
splash.add_image(im, (0,0))
#e32.ao_sleep(0.01)
def quit():
app_lock.signal()
appuifw.app.exit_key_handler = quit
app_lock = e32.Ao_lock()
for i in range(10):
splash_text(u"%d" % (i))
e32.ao_sleep(1)
app_lock.wait()
splash.hide()