From 5e30cf1fb7041f5858009c413f8cbcd7a9d6dcce Mon Sep 17 00:00:00 2001 From: Joe S <31870999+KenwoodFox@users.noreply.github.com> Date: Wed, 20 Jan 2021 00:40:08 -0500 Subject: [PATCH] Create a VERY BASIC main.py from example code in npyscreen (placeholder) --- Adventure Game/adventure_game/main.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Adventure Game/adventure_game/main.py diff --git a/Adventure Game/adventure_game/main.py b/Adventure Game/adventure_game/main.py new file mode 100644 index 0000000..96bc838 --- /dev/null +++ b/Adventure Game/adventure_game/main.py @@ -0,0 +1,24 @@ +import npyscreen + + +# This application class serves as a wrapper for the initialization of curses +# and also manages the actual forms of the application + +class MyTestApp(npyscreen.NPSAppManaged): + def onStart(self): + self.registerForm("MAIN", MainForm()) + + +# This form class defines the display that will be presented to the user. + +class MainForm(npyscreen.Form): + def create(self): + self.add(npyscreen.TitleText, name="Text:", value="Hellow World!") + + def afterEditing(self): + self.parentApp.setNextForm(None) + + +if __name__ == '__main__': + TA = MyTestApp() + TA.run()