PDA

View Full Version : Turbine.UI.Window & Labels


lunarwtr
11-03-2011, 09:15 PM
I have a simple plugin, that creates a class from Turbine.UI.Window, which contains a label that I set text into. Calling SetText on the label seems to be making the Text build up (not clearing the screen region where label is) overtime. It essentially looks like a big pile of font characters ontop of eachother.

When I switch to the Turbine.UI.Lotro.Window, the problem goes away. I thought it might be a blend mode thing, but couldn't tell why. I would prefer to use the base window class so I can have transparency behind the label. Thoughts on how to get this working?

Equendil
11-03-2011, 10:11 PM
I've had that issue with pictures, can't really remember much about all I did that didn't work but the following did do the trick:
- No background color set in either the window or controls
- No back color blend mode set in either the window or controls
- Blend mode set to BlendMode.Normal in the controls

May or may not work with labels of course. Blend modes give me a headache, although I'm usually fighting the API to *not* have my controls cause transparent holes into opaque windows.

Garan
11-04-2011, 08:56 AM
I noticed a similar issue that was introduced with RoI when I started the Wallet plugin. My workaround for it was to set a back color with no alpha using window:SetBackColor(0,0,0,0). Once a background or backcolor are assigned, the window seems to properly refresh as required (such as when a child control's text changes). I don't know if Turbine considers this to be working as intended, but I believe it to be a bug and you probably should report it as such (I reported it once, but such reports tend to get lost in the shuffle unless more than one person reports it).

lunarwtr
11-04-2011, 09:10 AM
Thank you both for fast replies. I'll try these tweaks tonight and see if SuperHappyFunLabel Plugin (j/k) works right. :D

lunarwtr
11-05-2011, 01:21 PM
Setting the background color of the window did the trick. Thanks again!