Text no display with SdkTrays

Problems building or running the engine, queries about how to use features etc.
Post Reply
Bpopey
Gnoblar
Posts: 10
Joined: Thu Jul 29, 2010 10:50 am

Text no display with SdkTrays

Post by Bpopey »

I have a little trouble. I tried the example archive SdkTraySample.zip
it works very well with Ogre v1.7.0, but when I compile it and execute it
with the version of Ogre v1.7.1, I have not the text display.

Image

What changes between these two versions can get this bug?
Or whatadaptation code does it make?

Thank you for your help ;)
dyndnsboy
Gnoblar
Posts: 4
Joined: Wed Jul 21, 2010 3:30 pm

Re: Text no display with SdkTrays

Post by dyndnsboy »

I had the same problem when putting on left position.

When i changed to right, it worked.

Also when i use another police, image based, not ttf it works at any position.
Bpopey
Gnoblar
Posts: 10
Joined: Thu Jul 29, 2010 10:50 am

Re: Text no display with SdkTrays

Post by Bpopey »

dyndnsboy wrote:When i changed to right, it worked.
it's the same thing for me.
dyndnsboy wrote:Also when i use another police, image based, not ttf it works at any position.
is an interesting information :)

but this difference between the latest version of Ogre is strange .. :?
Bpopey
Gnoblar
Posts: 10
Joined: Thu Jul 29, 2010 10:50 am

Re: Text no display with SdkTrays

Post by Bpopey »

up

some users have the same worries?

I still can not put my finger on the detail that does not work ...

Is there than we have encountered this problem with version 1.7.1 and SDKTray Ogre ?

:mrgreen:
ta_gopinath
Gnoblar
Posts: 15
Joined: Wed Jul 07, 2010 6:20 am
x 2

Re: Text no display with SdkTrays

Post by ta_gopinath »

hello

before creating the buttons, add this line

Ogre::FontManager::getSingleton().getByName("SdkTrays/Caption")->load();

issue is related with the fonts.

Thanks & Regards,
A. Gopinath.
Bpopey
Gnoblar
Posts: 10
Joined: Thu Jul 29, 2010 10:50 am

Re: Text no display with SdkTrays

Post by Bpopey »

it was so simple. :shock:

Thank you very much, really :D
you saved my life (almost)
User avatar
omniter
OGRE Contributor
OGRE Contributor
Posts: 424
Joined: Thu Mar 19, 2009 8:08 am
Location: Canada
x 44

Re: Text no display with SdkTrays

Post by omniter »

This is a bug in Ogre 1.7, not SdkTrays, and has been reported many times. Something about OverlayElements not updating their widths at the right time (but only for pixel metric). So be wary when using non-SdkTrays interfaces as well.
orc lord
Gnoblar
Posts: 2
Joined: Sun Sep 05, 2010 4:20 pm
Location: Germany

Re: Text no display with SdkTrays

Post by orc lord »

I solved this problem by calling mTrayMgr->adjustTrays(); once after rendering had started. for example in frameRenderingQueued;
User avatar
omniter
OGRE Contributor
OGRE Contributor
Posts: 424
Joined: Thu Mar 19, 2009 8:08 am
Location: Canada
x 44

Re: Text no display with SdkTrays

Post by omniter »

That is a good temporary solution until the bug gets fixed, since adjustTrays sets the dimensions and positions of all the OverlayElements. Any operation that will cause the OverlayElement's geom positions to be refreshed will fix this problem.
dave2041
Halfling
Posts: 71
Joined: Fri Apr 24, 2009 12:55 pm

Re: Text no display with SdkTrays

Post by dave2041 »

As a small update, should you have a slider or Select Menu, and the value select isn't showing use this line:

Code: Select all

Ogre::FontManager::getSingleton().getByName("SdkTrays/Value")->load();
In a similar manor to the previous fix for the button captions.
conx
Kobold
Posts: 32
Joined: Thu May 10, 2012 10:12 am

Re: Text no display with SdkTrays

Post by conx »

I'm digging it out just to notice that i have the same issue with Ogre 1.8.1 !
Thanks,Rafal
Post Reply