I have an small problem with my static texts, when they are close the last overlaps the previous one, as you can see here in the second image.
The only solution i have found is to increase space, but then I have too much wasted space and window looks bad. How can I solve this?
text overlaps each other
Moderators: CEGUI MVP, CEGUI Team
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Hi,
I'm not quite sure of what the cause is, but examining the screen shot, I'll have a guess at a possible cause.
It seems that possibly the static texts are too big, combine this with centred (or bottom) vertical alignment for the text and I think this problem shows up due to the way you then need to position the texts.
My first suggestion would be to make the texts smaller in the vertical dimension, and maybe also use top alignment for the text, this should make it slightly easier to position things so they do not overlap.
If the above does not work, or you can't do that for some other reason, my second suggestion is to disable the background for the static texts - obviously, depending on what you want and what is rendered behind the static texts, this may or may not be a solution, but it would solve the issue of the background of some static texts blanking portions of other nearby elements.
I'm not quite sure of what the cause is, but examining the screen shot, I'll have a guess at a possible cause.
It seems that possibly the static texts are too big, combine this with centred (or bottom) vertical alignment for the text and I think this problem shows up due to the way you then need to position the texts.
My first suggestion would be to make the texts smaller in the vertical dimension, and maybe also use top alignment for the text, this should make it slightly easier to position things so they do not overlap.
If the above does not work, or you can't do that for some other reason, my second suggestion is to disable the background for the static texts - obviously, depending on what you want and what is rendered behind the static texts, this may or may not be a solution, but it would solve the issue of the background of some static texts blanking portions of other nearby elements.
I don't know if this is going to work but if you post the code you are using maybe I could help better.
It seems that you have disabled the frames of the static text. Have you tried disabling the background?
If this didn't work try reducing the height of the component. For example:
José Tavares
It seems that you have disabled the frames of the static text. Have you tried disabling the background?
Code: Select all
((CEGUI::DefaultWindow*)component)->setProperty("BackgroundEnabled","false");
If this didn't work try reducing the height of the component. For example:
Code: Select all
((CEGUI::DefaultWindow*)component)->setHeight(cegui_reldim(height));
José Tavares
Who is online
Users browsing this forum: No registered users and 11 guests