I have the following code:
Code: Select all
init offset = -1
style default:
properties gui.text_properties()
language gui.language
color "#ff0000"
style whatever:
properties gui.text_properties()
language gui.language
color "#ff0000"
init 1 python:
style.example = Style(style.default)
This code works without any problems. If i want to use style.whatever as the parent of my example style:
Code: Select all
init 1 python:
style.example = Style(style.whatever)
, the code fails with "style whatever doesn't exist" traceback. In the documentation, I found, that style statement is run during init 0 phase, if not stated otherwise. Also, if I delete style default definition and use style.default as the parent, it still works. What exactly is going on here and how can I use my own style as parent?