Static Text setBackgroundColours problem

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

User avatar
catalin1976
Just popping in
Just popping in
Posts: 8
Joined: Wed Nov 02, 2005 08:20
Contact:

Static Text setBackgroundColours problem

Postby catalin1976 » Wed Nov 09, 2005 03:58

Hello!

I have a little problem:
Image

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!

User avatar
martignasse
Just can't stay away
Just can't stay away
Posts: 227
Joined: Thu Apr 14, 2005 08:10
Location: Lyon, FRANCE

Re: Static Text setBackgroundColours problem

Postby martignasse » Wed Nov 09, 2005 14:47

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 !

User avatar
martignasse
Just can't stay away
Just can't stay away
Posts: 227
Joined: Thu Apr 14, 2005 08:10
Location: Lyon, FRANCE

Re: Static Text setBackgroundColours problem

Postby martignasse » Fri Nov 25, 2005 18:40

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 :hammer:


PS :
And you made a mistake in you'r profile :D
http://www,gamecrest.ro
should be
http://www.gamecrest.ro

User avatar
catalin1976
Just popping in
Just popping in
Posts: 8
Joined: Wed Nov 02, 2005 08:20
Contact:

Re: Static Text setBackgroundColours problem

Postby catalin1976 » Sat Nov 26, 2005 04:04

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.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Static Text setBackgroundColours problem

Postby CrazyEddie » Sun Nov 27, 2005 11:11

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.

User avatar
b-s-a
Just popping in
Just popping in
Posts: 10
Joined: Wed Nov 30, 2005 16:12
Location: Moscow, Russia
Contact:

Re: Static Text setBackgroundColours problem

Postby b-s-a » Thu Dec 01, 2005 18:58

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?

User avatar
b-s-a
Just popping in
Just popping in
Posts: 10
Joined: Wed Nov 30, 2005 16:12
Location: Moscow, Russia
Contact:

Re: Static Text setBackgroundColours problem

Postby b-s-a » Thu Dec 01, 2005 21:00

I found my error: I must use tr,tl,br,bl in BackgroundColours. And need use BackgroundImage...


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 10 guests