windows.confirm: Type everything in this module.

This commit is contained in:
Emmanuel Gil Peyrot 2018-08-17 17:09:26 +01:00
parent 45066d0eef
commit 4fc2338faa

View file

@ -7,12 +7,12 @@ class Dialog(Win):
str_accept = " Accept " str_accept = " Accept "
str_refuse = " Reject " str_refuse = " Reject "
def __init__(self, helper_text, critical=False): def __init__(self, helper_text: str, critical: bool = False) -> None:
self.text = helper_text self.text = helper_text
self.accept = False self.accept = False
self.critical = critical self.critical = critical
def refresh(self): def refresh(self) -> None:
self._win.erase() self._win.erase()
self.addstr(self.text + "\n ") self.addstr(self.text + "\n ")
@ -35,5 +35,5 @@ class Dialog(Win):
self._refresh() self._refresh()
def toggle_choice(self): def toggle_choice(self) -> None:
self.accept = not self.accept self.accept = not self.accept