Send button functions but needs implementation

This commit is contained in:
Joe S 2021-02-17 22:46:21 -05:00
parent 6743be8a6c
commit 04669d0f8f
1 changed files with 8 additions and 2 deletions

View File

@ -1,8 +1,12 @@
import npyscreen import npyscreen, sys
from npyscreen import NotEnoughSpaceForWidget from npyscreen import NotEnoughSpaceForWidget
from yaml_parser import parse_datafile as parse from yaml_parser import parse_datafile as parse
class ExitButton(npyscreen.ButtonPress):
def whenPressed(self):
sys.exit(0)
class GameNavigator(npyscreen.Form): class GameNavigator(npyscreen.Form):
def afterEditing(self): def afterEditing(self):
@ -45,11 +49,13 @@ class GameNavigator(npyscreen.Form):
self.dialogueBox = self.add(npyscreen.Textfield, self.dialogueBox = self.add(npyscreen.Textfield,
name='Type Here', name='Type Here',
max_width=inventory_width + art_width - 2, max_width=inventory_width + art_width - 7,
max_height=1, max_height=1,
relx=2, relx=2,
rely=top_division_height + 3) rely=top_division_height + 3)
self.tryAction = self.add(ExitButton, name="Send", relx=inventory_width + art_width - 7, rely=top_division_height + 3)
class MainMenu(npyscreen.Form): class MainMenu(npyscreen.Form):
def afterEditing(self): def afterEditing(self):