window.rml 459 B

1234567891011121314151617181920
  1. <template name="pywindow" content="content">
  2. <head>
  3. <link type="text/template" href="../../assets/window.rml" />
  4. <script>
  5. import game
  6. def OnWindowLoad(self):
  7. self.owner_document.GetElementById('title').inner_rml = self.title
  8. def LoadMenu(name):
  9. doc = document.context.LoadDocument('data/' + name + '.rml')
  10. if doc:
  11. doc.Show()
  12. document.Close()
  13. return doc
  14. </script>
  15. </head>
  16. <body template="window" onload="OnWindowLoad(self)">
  17. </body>
  18. </template>