diff options
| author | troido <troido@protonmail.com> | 2018-09-06 15:11:54 +0200 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2018-09-06 15:11:54 +0200 |
| commit | c12f77caefbb9abf4678996c2c0395483c81d93f (patch) | |
| tree | 46f5db253ef4d7ba9eb951cd0f4539e367fc5f08 /asciifarm/client/display/textinput.py | |
| parent | 3ed17230c18053efc1835a0030b8d280be53c31e (diff) | |
widget implementations now inherit from superclass
Diffstat (limited to 'asciifarm/client/display/textinput.py')
| -rw-r--r-- | asciifarm/client/display/textinput.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/asciifarm/client/display/textinput.py b/asciifarm/client/display/textinput.py index 3b5def2..cb0ed61 100644 --- a/asciifarm/client/display/textinput.py +++ b/asciifarm/client/display/textinput.py @@ -1,20 +1,17 @@ import curses +from .widimp import WidImp -class TextInput: +class TextInput(WidImp): def __init__(self): - self.widget = None self.text = "" self.cursor = 0 - - def setWidget(self, widget): - self.widget = widget - + def setText(self, text, cursor): self.text = text self.cursor = cursor - self.widget.change() + self.change() def update(self, win): width, height = win.getSize() |
