ta2025
01-10-2006 16:05:05
I am trying to add overlaid text to the demo I am creating...
I found some examples at the Ogre.net forums and have tried to adopt them, but my success rate at adopting non-python to python is not very good yet. I never can seem to find my SELF!!!
Here is what I ported...
From http://www.ogre3d.org/wiki/index.php/Og ... Tutorial_7
Please dont laugh at my feeble attempts!
Thanks
I found some examples at the Ogre.net forums and have tried to adopt them, but my success rate at adopting non-python to python is not very good yet. I never can seem to find my SELF!!!
Here is what I ported...
def textContainer(self):
el = OverlayManager.Instance.CreateOverlayElement("Panel", "HelloOgreDotNet/Panel")
container = OverlayContainer(el, false)
container.MetricsMode(GuiMetricsMode.GMM_PIXELS)
container.Position(10, 10)
container.Dimensions(500, 100)
to = OverlayManager.Instance.CreateTextAreaElement("HelloOgreDotNet/HelloWorldText")
container.addChild(to)
to.setMetricsMode(GuiMetricsMode.GMM_PIXELS)
to.setPosition(0, 0)
to.setDimensions(100, 100)
to.setCaption("Hello World")
to.setCharHeight(48)
to.setFontName("Arial")
to.setColourBottom(Converter.Color(0.3, 0.5, 0.3))
to.setColourTop(Converter.Color(0.5, 0.7, 0.5))
overlay = OverlayManager.Instance.create("Status/Overlay")
overlay.add2D(container)
overlay.show()
From http://www.ogre3d.org/wiki/index.php/Og ... Tutorial_7
Please dont laugh at my feeble attempts!
Thanks