Re: Encyclopaedia / Bestiary Framework
Posted: Tue Sep 11, 2018 8:43 am
In this case, what you want is:
Code: Select all
textbutton _("Encyclopedia") action ShowMenu("encyclopaedia_list", your_new_encyclopaedia)
AERenoir wrote: ↑Tue Sep 11, 2018 5:51 am After creating entries I tried to make a button to open the Encyplopedia.
I inserted the Encyclopedia button at the start menu. The documentation says it needs two arguments, but I'm not sure what the format is supposed to be.
I wrote it like this, and it's obviously wrong:The sample entry, as copy-pasted from the documentationCode: Select all
textbutton _("Encyclopedia") action ShowMenu("encyclopaedia_list",Encyclopaedia)
Code: Select all
init python: your_new_encyclopaedia = Encyclopaedia() python: your_new_encyclopaedia = Encyclopaedia() about_zeus = EncEntry( parent=your_new_encyclopaedia, name="Zeus", text=[ "Zeus is the sky and thunder god in ancient Greek religion, who ruled as king of the gods of Mount Olympus." " His name is cognate with the first element of his Roman equivalent Jupiter." " His mythologies and powers are similar, though not identical, to those of Indo-European deities such as Indra, Jupiter, Perun, Thor, and Odin." ], viewed_persistent=True, )