I wrote a simple overlay script to understand ogre3d's overlay system:
Code: Select all
overlay test
{
zorder 500
overlay_element root Panel
{
metrics_mode pixels
left 50
top 50
width 400
height 400
material red
overlay_element p1 Panel
{
metrics_mode relative
left 0.1
top 0.1
width 0.5
height 0.5
material blue
}
}
}
I expect the width and height of 'panel1' to be 80% relative to the parent container,but unfortunately it seems that the [metrics_mode relative] is interpreted as a proportion of the width / height of the screen, not the parent container!
Doesn't this looks wired? what's a good reason to do this? Is there an easy way to specify container dimensions as a proportion relative to the parent container?