adventure-game #3

Open
Kenwood wants to merge 80 commits from adventure-game into master
2 changed files with 7 additions and 3 deletions
Showing only changes of commit eb70e4a438 - Show all commits

View File

@ -1,5 +1,9 @@
import npyscreen
from Player import Player
class MainMenu(npyscreen.Form):
def afterEditing(self):
# TODO: the game needs to happen after this inital main menu
@ -8,4 +12,6 @@ class MainMenu(npyscreen.Form):
def create(self):
self.add(npyscreen.FixedText, value='You cannot select a file yet! Just hit OK', editable=False)
self.playerSaveLocation = self.add(npyscreen.TitleFilenameCombo, name="Your save file:")
self.parentApp.player = Player('playerdata/defaults/default_player.yaml')
self.add(npyscreen.MultiLineEdit, value=self.parentApp.gamelib['menu']['graphics']['logo'], editable=False)

View File

@ -5,7 +5,6 @@ from os import system
from yaml_parser import parse_datafile as parse
from GameNavigator import GameNavigator
from MainMenu import MainMenu
from Player import Player
class AlphaWarning(npyscreen.Popup):
@ -24,9 +23,8 @@ class AdventureGame(npyscreen.NPSAppManaged):
# Setup some important 'global' values we'll need later
self.gamelib = parse(
'gamedata/gamelib.yaml') # parse this data first (since it includes graphics for the main menu
self.playerSaveLocation = 'playerdata/defaults/default_player.yaml' #TODO: Actually load the player data
self.player = Player(self.playerSaveLocation)
self.player = None # Intalize the player as none, the player will be created in the main menu.
# Set screen size before drawing windows
dimensions = self.gamelib['menu']['graphics']['dimensions']