Page 1 of 1
Static Text setBackgroundColours problem
Posted: Wed Nov 09, 2005 03:58
by catalin1976
Hello!
I have a little problem:
I use the following code:
Code: Select all
_background->setBackgroundEnabled(true);
_background->setFrameEnabled(true);
_background->setBackgroundImage("TaharezLook", "MultiListSelectionBrush");
_background->setText(" " + text);
_background->setEnabled(true);
_background->setFrameColours(CEGUI::colour(0.1, 1.0, 0.1), CEGUI::colour(0.1, 1.0, 0.1),
CEGUI::colour(0.1, 0.5, 0.1), CEGUI::colour(0.1, 0.5, 0.1));
_background->setBackgroundColours(CEGUI::colour(0.1, 1.0, 0.1), CEGUI::colour(0.1, 1.0, 0.1),
CEGUI::colour(0.1, 0.5, 0.1), CEGUI::colour(0.1, 0.5, 0.1));
As you can see from the image the background is only in center.
What can I do to remove the dark gray between the frame and the background?
Thank!
Re: Static Text setBackgroundColours problem
Posted: Wed Nov 09, 2005 14:47
by martignasse
hi,
what is the widget type you use ?
The result you have is because the widget definition in the .looknfeel
one solution is to found another widget type suiting your need.
Another solution is to make you'r own looknfeel !
Re: Static Text setBackgroundColours problem
Posted: Fri Nov 25, 2005 18:40
by martignasse
hi,
just to say i saw you'r
thread on the ogre forum and i think the CEGUI community can be interested by that.
A post in the Project Announcements section could good
PS :
And you made a mistake in you'r profile
http://www,gamecrest.ro
should be
http://www.gamecrest.ro
Re: Static Text setBackgroundColours problem
Posted: Sat Nov 26, 2005 04:04
by catalin1976
Thanks for that address mistake info.
That program is really for editing objects for ogre3D engine. After the announcement and the reaction of the person I realize that there is not very much interest in that type of program. I’ll do some tuning and then I will make an announcement to CEGUI community also.
Re: Static Text setBackgroundColours problem
Posted: Sun Nov 27, 2005 11:11
by CrazyEddie
The backgound image is contained within an area formed by the frame images; this is the reason that the centre potion has that grey frame.
To fix it, you could edit the frame images so that the grey area is white; this way it will take on any assigned colour you choose for the frame. By using the technique it should be possible to get the two components to blend together.
Another approach would be to edit the imageset such that the frame edge images have a smaller size, and so do not form such a border.
HTH
CE.
Re: Static Text setBackgroundColours problem
Posted: Thu Dec 01, 2005 18:58
by b-s-a
I have problem with background too. I need default blue background for whole screen.
I have xml which contain my windows. I try to make StaticImage/StaticText for testing:
Code: Select all
<Window Type="TaharezLook/StaticText" Name="bkground" >
<Property Name="BackgroundColours" Value="topLeft:FF0000FF topRight:FF0000FF bottomLeft:FF0000FF bottomRight:FF0000FF" />
<Property Name="FrameColours" Value="topLeft:FF0000FF topRight:FF0000FF bottomLeft:FF0000FF bottomRight:FF0000FF" />
<Property Name="BackgroundEnabled" Value="True" />
<Property Name="FrameEnabled" Value="True" />
<Property Name="Position" Value="x:0.1 y:0.1" />
<Property Name="Size" Value="w:0.1 h:0.1" />
<Property Name="Text" Value="TEST" />
<Property Name="Visible" Value="True" />
<Property Name="Enabled" Value="True" />
</Window>
Result - frame with text "TEST" on black background! What I do wrong? Why background isn't blue?
Re: Static Text setBackgroundColours problem
Posted: Thu Dec 01, 2005 21:00
by b-s-a
I found my error: I must use tr,tl,br,bl in BackgroundColours. And need use BackgroundImage...