1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 23:48:12 +00:00

added button to finish [tbd]

This commit is contained in:
chren 2016-06-09 19:01:43 +02:00 committed by Pavol Rusnak
parent 7237321470
commit cb2027ad86
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -1,5 +1,6 @@
from trezor import wire, loop, res, ui
from trezor.ui.swipe import Swipe, SWIPE_UP, SWIPE_DOWN
from trezor.ui.button import Button, CONFIRM_BUTTON, CONFIRM_BUTTON_ACTIVE
from trezor.crypto import hashlib, random, bip39
from trezor.utils import unimport_gen
@ -57,6 +58,9 @@ def layout_reset_device(m):
top = 74 + i * 30
ui.display.text_right(40, top, '%d.' % (index + 1), ui.BOLD, ui.LIGHT_GREEN, ui.BLACK)
ui.display.text(45, top, '%s' % word, ui.BOLD, ui.WHITE, ui.BLACK)
if(len(mnemonic_words) // words_per_page == page + 1):
finish = Button((0, 240 - 48, 240, 48), 'Finish', normal_style=CONFIRM_BUTTON, active_style=CONFIRM_BUTTON_ACTIVE)
finish.render()
def paginate():
count = len(mnemonic_words) // words_per_page