StaticTextProperties; patch submitted (+Q)

Forum for general chit-chat or off-topic discussion.

Moderators: CEGUI MVP, CEGUI Team

User avatar
Sinbad
Not too shy to talk
Not too shy to talk
Posts: 35
Joined: Wed Jan 12, 2005 12:06
Location: Guernsey, Channel Islands
Contact:

StaticTextProperties; patch submitted (+Q)

Postby Sinbad » Sat Aug 07, 2004 22:40

I've just posted a patch to StaticTextProperties to expose a few more properties (I use XML to define my widgets and there were some features I needed which were not exposed). See http://sourceforge.net/tracker/index.ph ... tid=605424.

I have a question though; setBackgroundColours does not appear to work correctly, at least not with the Taharez look. I wanted to have a nice frame-less static text box (done) with a background which faded from solid blue, through to completely transparent on the right. So I used (with the patch ;)):

Code: Select all

<Property Name="BackgroundColours" Value="tl:FF0055FF tr:00000000 bl:FF0055FF br:00000000"/>

However, the background remains black instead of blue, but the alpha is working since I can see the Taharez window background fading in n on the right. So it's ignoring the colour but not the alpha.

If I re-enable the frame and use the same parameters on FrameColours, that works perfectly, if that's of any help.

User avatar
Sinbad
Not too shy to talk
Not too shy to talk
Posts: 35
Joined: Wed Jan 12, 2005 12:06
Location: Guernsey, Channel Islands
Contact:

StaticTextProperties; patch submitted (+Q)

Postby Sinbad » Sat Aug 07, 2004 22:52

Ignore the patch, I just realised these properties were exposed in the parent StaticProperties. :oops:

The question still remains though :)

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

StaticTextProperties; patch submitted (+Q)

Postby CrazyEddie » Sun Aug 08, 2004 05:47

Ignore the patch, I just realised these properties were exposed in the parent StaticProperties. :oops:

Hehe :D I feel that this, as well as inherited events, will come up often.

The question still remains though :)

Right, this is kind of a half-bug in the imagery. What's causing it is that the default background image is black; so when the texture imagery is modulated with the colour you set, the result will always be black (because n * 0 == 0). I will change this, as I think that most people will not be expecting this behaviour. In the mean time, a work around is to set a background image for the StaticText that can be successfully colour modulated (try set:TaharezImagery image:MultiListSelectionBrush).

HTH

CE.

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

StaticTextProperties; patch submitted (+Q)

Postby CrazyEddie » Sun Aug 08, 2004 11:09

Nobody is working on a tab control that I know of. The closest was Spannerman who was 'faking' one by using a customised ListHeader, though I'm not sure if he ever got it to work :) If you do start this, let me know if you need any kind assistance.

CE.

User avatar
Sinbad
Not too shy to talk
Not too shy to talk
Posts: 35
Joined: Wed Jan 12, 2005 12:06
Location: Guernsey, Channel Islands
Contact:

StaticTextProperties; patch submitted (+Q)

Postby Sinbad » Sun Aug 08, 2004 14:38

The MultListSelectionBrush works like a charm, thanks. I'll start working on a tablist control then; I'll probably just make a basic one to start with as I have a deadline (so no multi-line tabs, and no tab scrolling).

I should be able to re-use the top sections of the frame imagery for the tabs, I'm not quite sure how all of this works yet so I'll shout if I get into trouble. :)

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

StaticTextProperties; patch submitted (+Q)

Postby CrazyEddie » Sun Aug 08, 2004 16:01

Cool :)

Taharez did add imagery components intended for tabs, but I haven't added entries to the Imageset definition for these. If you look at Layout.tga, they're the bits under the big mouse arrow cursor, you have a tab left end, a tab middle section, a tab right end, and the bit underneath these, I think, is supposed to form the top of your container window which the tabs sit on top of :o Edit: Actually I think that bit underneat is for 'middle' tabs :oops:

I could add these parts to the TaharezImageset.xml file, though obviously this is fairly easily done and maybe you want to do it yourself? Let me know if you want me to do it and I'll upload an updated imageset :)

User avatar
Sinbad
Not too shy to talk
Not too shy to talk
Posts: 35
Joined: Wed Jan 12, 2005 12:06
Location: Guernsey, Channel Islands
Contact:

StaticTextProperties; patch submitted (+Q)

Postby Sinbad » Sun Aug 08, 2004 17:28

Hmm, yeah I saw those, but I didn't think they'd look quite right. For a start, the 'top border' image underneath has a 1-pixel gap at the top (which I could eliminate with texture coords, but it needs to be eliminated to avoid a gap), but more significantly the colours alter over the width, and since I need to 'paste' together multiple parts (imagine when the active tab is in the middle; there will need to be one border on the left of it, and one on the right). Also, the vertical bits of the tab fade out a little too much for my liking. Since I have to construct the rest of the tab area from the Static frame sections, for consistency of appearance and to make sure everything meets up I thought I'd use that for all of it.

As an aside, can you invert an image by specifying the x/y coords backwards?

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

StaticTextProperties; patch submitted (+Q)

Postby CrazyEddie » Sun Aug 08, 2004 18:29

As an aside, can you invert an image by specifying the x/y coords backwards?

I'm not sure where you're talking about doing this, so I don't know. Nothing like this was designed into the system though :?

User avatar
Sinbad
Not too shy to talk
Not too shy to talk
Posts: 35
Joined: Wed Jan 12, 2005 12:06
Location: Guernsey, Channel Islands
Contact:

StaticTextProperties; patch submitted (+Q)

Postby Sinbad » Sun Aug 08, 2004 20:28

Sorry, I meant whether you could invert the texture coords to flip imagery horizontally or vertically; seemed like it would save you texture space if you could do that and give you a few more variations of things. I can live without it though :)

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

StaticTextProperties; patch submitted (+Q)

Postby CrazyEddie » Mon Aug 09, 2004 08:39

Beyond the CEGUI::Texture object, nothing deals in texture co-ords. However, I think flipping would be a cool thing to offer :) I'll probably add this to my list of things to put in (most likely as a flags parameter to the Imageset::draw method, with values such as FlipVertical and FlipHorizontal, etc).

CE.


Return to “Offtopic Discussion”

Who is online

Users browsing this forum: No registered users and 3 guests