Mercurial > parpg-core
view src/parpg/gui/charactercreationview.py @ 2:e2a8e3805b04
Made parpg-core the main repository to pull from and build.
* Added parpg-assets as a subrepo under the data folder.
* Moved the SConstruct script into parpg-core and modified it to build and install parpg-assets as well.
* Made a few minor changes to the SConstruct file from the defunct parpg-main repository.
* Modified unix parpg executable script template to be more forgiving of installing the parpg Python package outside of PYTHONPATH.
* Updated the .hgignore file to include temporary SCons files.
author | M. George Hansen <technopolitica@gmail.com> |
---|---|
date | Sun, 15 May 2011 14:51:41 -0700 |
parents | 1fd2201f5c36 |
children | d60f1dab8469 |
line wrap: on
line source
from fife.extensions import pychan from fife.extensions.pychan.widgets import Label, HBox from parpg.gui.spinner import IntSpinner class CharacterCreationView(object): def __init__(self, xml_script_path='gui/character_creation.xml'): self.gui = pychan.loadXML(xml_script_path) def createStatisticList(self, statistics): statistics_list = self.gui.findChild(name='statisticsList') # Start with an empty list. statistics_list.removeAllChildren() for statistic in statistics: name = statistic.long_name hbox = HBox() hbox.opaque = 0 label = Label(text=name) spinner = IntSpinner(lower_limit=0, upper_limit=100) hbox.addChildren(label, spinner) statistics_list.addChildren(hbox) def createTraitsList(self, traits): pass def updateMessageArea(self, message): message_area = self.gui.findChild(name='messageArea') message_area.text = unicode(message)