Skip to content

Commit

Permalink
Finalizing refactor to KeyboardScreen.
Browse files Browse the repository at this point in the history
  • Loading branch information
kdmukai committed Apr 25, 2022
1 parent fcee15d commit d62c8cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/seedsigner/gui/screens/tools_screens.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,19 +172,20 @@ def __post_init__(self):
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
super().__post_init__()

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",
Expand Down
4 changes: 2 additions & 2 deletions src/seedsigner/views/tools_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,13 +242,13 @@ def run(self):
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))



Expand Down

0 comments on commit d62c8cf

Please sign in to comment.