Hi! Regarding our discussion about the orx "subsection"s:
The idea was:
[MyObject]
Graphic.Text.String = Hello, world!
Sound.Music = traviata.ogg
would be expanded to:
[MyObject]
Graphic = MyObject.Graphic
Sound = MyObject.Sound
[MyObject.Graphic]
Text = MyObject.Graphic.Text
[MyObject.Graphic.Text]
String = Hello, world!
[MyObject.Sound]
Music = traviata.ogg
There are two things I'd like to open for discussion here;
1) Composite Objects
in response to this proposal, I asked whether we can extend this proposal to also be useful for composite objects:
If I have a composite BoardA containing TextA:
[BoardA]
Content = TextA
[TextA]
Graphic = @
Text = @
String = This is text A
And I want to derive a "BoardB" from this which only differs in it's "Content"'s text, right now I need to write:
[BoardB]
Content = TextB
[TextB@TextA]
String = This is some other text
But similar to the proposal, I'd like to just write:
[BoardB@BoardA]
Content.String = This is some other text
At the time, we weren't able to come up with a way to achieve this, but I think I may have a solution. What we could do is when you write the above BoardB in config, similar to iarwain's proposal it gets expanded to:
[BoardB@BoardA]
Content = BoardB.Content
[BoardB....@BoardA.Content]
String = This is some other text
I.e, the newly craeted BoardB.Content section inherits from whatever the "Content" field contained before.
2) Back References to Parent
This issue is independent of my composite object extension, so the issue exits for both cases. What happens when the user enters:
[MyObject]
SomeField = ABCD
Graphic.Text.String = @.SomeField
Will this work? If it does; how about this:
[MyOtherObject@MyObject]
SomeField = EFGH
Will MyOtherObject's Graphic's String refer back to MyOtherObject's Somefield?
I know this brings a lot of complexity, and the answer might legitimately just be "no", but if it ends up being "yes" it'll bring a lot of flexibility. You can for instance pull off a trick like this in pure config:
[RabbitJumpAnim]
Texture = rabbit.png
KeyData1.Texture = @.Texture
KeyData1.TextureSize = (50,50,0)
KeyData2.Texture = @.Texture
KeyData2.TextureSize = (50,50,0)
KeyData2.TextureCorner = (50,0,0)
...
If the answer is "yes", you can do:
[FrogJumpAnim@RabbitJumpAnim]
Texture = frog.png
Needless to say, such a flexibility helps composite objects a lot too.