Open kennysmed opened 8 years ago
As for the API, I'm thinking a blocking function for really simple use, just like a raw_input()
call-
def keyboard_prompt(initial='', prompt='', ok_button='OK', background_color='black', allow_empty=True):
# implementation here
pass
So programs can use it like
password = keyboard_prompt(prompt='Password', initial='qwerty123')
Full example app:
import tingbot
from tingbot import *
state = {}
@button.press('left')
def change_name():
state['name'] = keyboard_prompt(state['name'], prompt='Name')
def loop():
screen.fill(color='black')
screen.text('Hello, %s!' % state['name'])
tingbot.run(loop)
Here are the designs for the keyboard:
Joe will follow up with the API