I'm trying to use this with some settings in json format. I would like to be able to add settings just by adding an entry into the json file. To do this more easily, I would like to iterate over the imported json list to add menu items. Interestingly I've found that if I declare and set the MenuScreen first, then add items, all ValueItems through a display fault.
and it fails with the self.display being a NoneType object. Any thoughts on a way to rectify this? It seems to only impact ValueItem, since it has its own defined draw(). It does display the item in the main menu, it just throws the exception when it is selected.
I'm trying to use this with some settings in json format. I would like to be able to add settings just by adding an entry into the json file. To do this more easily, I would like to iterate over the imported json list to add menu items. Interestingly I've found that if I declare and set the MenuScreen first, then add items, all ValueItems through a display fault.
i.e. this works:
this doesn't:
and it fails with the self.display being a NoneType object. Any thoughts on a way to rectify this? It seems to only impact ValueItem, since it has its own defined draw(). It does display the item in the main menu, it just throws the exception when it is selected.