static text background colors

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

overlord
Just popping in
Just popping in
Posts: 7
Joined: Thu May 31, 2007 19:21

static text background colors

Postby overlord » Tue Jun 05, 2007 18:24

is it possible to have a StaticText with a background color?
i tried

<Window Type="TaharezLook/StaticImage" Name="Testing">
<Property Name="BackgroundEnabled" Value="true"/>
<Property Name="BackgroundColours" Value="tl:FFDFDFDF tr:FFDFDFDF bl:FFDFDFDF br:FFDFDFDF" />
...

but it didn't seem to do anything

overlord
Just popping in
Just popping in
Posts: 7
Joined: Thu May 31, 2007 19:21

Re: static text background colors

Postby overlord » Fri Jun 08, 2007 16:04

i also tried editing the sample demo "first window"
and added this before the return true;

CEGUI::Window * w = winMgr.createWindow("TaharezLook/StaticText", "text");

w->setPosition(UVector2(cegui_reldim(0.25f), cegui_reldim( 0.25f)));
w->setSize(UVector2(cegui_reldim(0.5f), cegui_reldim( 0.5f)));
w->setProperty("Text", "testing");
w->setProperty("BackgroundEnabled", "true");
w->setProperty("FrameEnabled", "true");
w->setProperty("BackgroundColours", "tl:FFFF0000 tr:FFFF0000 bl:FFFF0000 br:FFFF0000");
wnd->addChildWindow(w);

the window shows up, but doesn't have any coloring

any ideas?


overlord wrote:is it possible to have a StaticText with a background color?
i tried

<Window Type="TaharezLook/StaticImage" Name="Testing">
<Property Name="BackgroundEnabled" Value="true"/>
<Property Name="BackgroundColours" Value="tl:FFDFDFDF tr:FFDFDFDF bl:FFDFDFDF br:FFDFDFDF" />
...

but it didn't seem to do anything

Rackle
CEGUI Team (Retired)
Posts: 534
Joined: Mon Jan 16, 2006 11:59
Location: Montréal

Postby Rackle » Fri Jun 08, 2007 18:17

I've tried but failed.

One clue may be found within taharezlook.looknfeel:

Code: Select all

<WidgetLook name="TaharezLook/StaticShared">
  <ImagerySection name="background">
    <Image imageset="TaharezLook" image="StaticBackdrop" />
    <!--<ColourRectProperty name="BackgroundColours" />-->
    <Colours topLeft="FFFFFFFF" topRight="FFFFFFFF" ...


versus WindowsLook.looknfeel:

Code: Select all

<WidgetLook name="WindowsLook/Static">
  <StateImagery name="WithFrameEnabledBackground">
    <Layer>
      <Section look="WindowsLook/StaticShared" section="background">
        <ColourRectProperty name="BackgroundColours" />


Return to “Help”

Who is online

Users browsing this forum: No registered users and 8 guests