My TextAreaOverlayElement does not appear

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.

My TextAreaOverlayElement does not appear

Postby icaro56 » Thu Dec 02, 2010 6:41 pm

Hi,

I've searched the forum about it and the solutions found not solved my problem.

My code is thus:

Code: Select all
        Overlay *ov = OverlayManager::getSingleton().create("OverlayTexto");
   ov->setZOrder(900);

   OverlayContainer *container = static_cast<OverlayContainer*>(OverlayManager::getSingleton().createOverlayElement("Panel", "Test123"));
   container->setMetricsMode(GMM_PIXELS);
   container->setVerticalAlignment(GVA_TOP);
   container->setHorizontalAlignment(GHA_LEFT);
   container->setDimensions(100,100);
   container->setPosition(0,0);
   container->setParameter("transparent", "true");

   ov->add2D(container);

   OverlayElement *element = OverlayManager::getSingleton().createOverlayElement("TextArea", "elementText");
   element->setMetricsMode(GMM_PIXELS);
   element->setVerticalAlignment(GVA_TOP);
   element->setHorizontalAlignment(GHA_LEFT);

   element->setParameter("char_height", "16");
   element->setParameter("font_name", "blue16");
   element->setParameter("alignment", "left");
   element->setColour(ColourValue(1,0,0));
   element->setPosition(0,50);
   element->setDimensions(100,50);
   element->setCaption("I am idiot");

   container->addChild(element);

   ov->show();


I think it's a logic error.
Ícaro Motta
User avatar
icaro56
Greenskin
 
Posts: 105
Kudos: 1
Joined: 15 Feb 2009
Location: Belo Horizonte, MG, BRA

Re: My TextAreaOverlayElement does not appear

Postby icaro56 » Thu Dec 02, 2010 7:52 pm

I found out which this code runs in 1.70 ogre, but does not work in 1.71. Why?
Ícaro Motta
User avatar
icaro56
Greenskin
 
Posts: 105
Kudos: 1
Joined: 15 Feb 2009
Location: Belo Horizonte, MG, BRA

Re: My TextAreaOverlayElement does not appear

Postby icaro56 » Fri Dec 03, 2010 1:31 pm

Where do I report the bug?
Ícaro Motta
User avatar
icaro56
Greenskin
 
Posts: 105
Kudos: 1
Joined: 15 Feb 2009
Location: Belo Horizonte, MG, BRA

Re: My TextAreaOverlayElement does not appear

Postby Stickymango » Wed Dec 08, 2010 4:44 pm

Maybe this is related to the bug I found: viewtopic.php?f=2&t=58047

If your text isn't appearing then thats probably why...
Stickymango
Hobgoblin
 
Posts: 540
Kudos: 0
Joined: 17 Nov 2004
Location: Middlesbrough, England


Return to Using OGRE in practice

Who is online

Users browsing this forum: No registered users and 2 guests