Finalizing refactor to KeyboardScreen.

This commit is contained in:
kdmukai
2022-04-24 19:11:09 -05:00
parent fcee15dcf1
commit d62c8cfb0e
2 changed files with 5 additions and 4 deletions
+3 -2
View File
@@ -172,11 +172,12 @@ class ToolsCalcFinalWordFinalizePromptScreen(ButtonListScreen):
class ToolsCoinFlipEntryScreen(KeyboardScreen):
def __post_init__(self):
# Override values set by the parent class
self.title = f"Coin Flip 1/{self.total_flips}"
self.title = f"Coin Flip 1/{self.return_after_n_chars}"
# Specify the keys in the keyboard
self.rows = 1
self.cols = 4
self.key_height = GUIConstants.TOP_NAV_TITLE_FONT_SIZE + 2 + 2*GUIConstants.EDGE_PADDING
self.keys_charset = "10"
# Now initialize the parent class
@@ -184,7 +185,7 @@ class ToolsCoinFlipEntryScreen(KeyboardScreen):
self.components.append(TextArea(
text="Heads = 1",
screen_y = self.keyboard_digits.rect[3] + 4*GUIConstants.COMPONENT_PADDING,
screen_y = self.keyboard.rect[3] + 4*GUIConstants.COMPONENT_PADDING,
))
self.components.append(TextArea(
text="Tails = 0",
+2 -2
View File
@@ -242,13 +242,13 @@ class ToolsCalcFinalWordNumWordsView(View):
self.controller.storage.init_pending_mnemonic(12)
# return Destination(SeedMnemonicEntryView, view_args=dict(is_calc_final_word=True))
return Destination(SeedMnemonicEntryView, view_args=dict(cur_word_index=10, is_calc_final_word=True))
return Destination(SeedMnemonicEntryView, view_args=dict(is_calc_final_word=True))
elif button_data[selected_menu_num] == TWENTY_FOUR:
self.controller.storage.init_pending_mnemonic(24)
# return Destination(SeedMnemonicEntryView, view_args=dict(is_calc_final_word=True))
return Destination(SeedMnemonicEntryView, view_args=dict(cur_word_index=22, is_calc_final_word=True))
return Destination(SeedMnemonicEntryView, view_args=dict(is_calc_final_word=True))