def get_user_text(title, value, size=(None, None)): from thorpy.miscgui.launchers.launcher import make_ok_box, auto_ok, launch_blocking ins = Inserter.make(title, value=value, size=size) box = make_ok_box([ins]) auto_ok(box) box.center() ins.enter() launch_blocking(box) return ins.get_value()
def launch_inserter(title_text, initial_value="", parent=None, title_fontsize=None, title_fontcolor=None, main_color=None, blocking=True): from thorpy.miscgui.launchers.launcher import make_ok_box, auto_ok, launch_blocking ins = Inserter.make(title_text, value=initial_value) ins.center() ins.enter() launch_blocking(ins) parent.unblit_and_reblit() return ins.get_value()