AntonicelliVittorio / jmonkeyengine

Automatically exported from code.google.com/p/jmonkeyengine
0 stars 0 forks source link

blendMode=”multiply” in Nifty renders incorrectly #609

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
As discussed on the forum at

http://hub.jmonkeyengine.org/forum/topic/nifty-labels-inside-a-scrollpanel-contr
ol/

some change between 3.0RC2 and 3.0.1 caused incorrect rendering of Nifty
labels and buttons inside a scrollpanel.  (Identical labels and buttons work 
fine outside of scrollpanel.)  In the incorrectly rendered controls, character 
glyphs render as black boxes.

The issue can be worked around by defining a new style for scrollpanel,
supporting the idea that it is related to blendMode=”multiply” in the 
standard-style scrollpanel.

The test case and workaround may be found in the forum thread.

Original issue reported on code.google.com by sg...@sonic.net on 21 Nov 2013 at 3:12

GoogleCodeExporter commented 9 years ago
The workaraound is no longer available in the forum thread.

Original comment by JStelter...@googlemail.com on 17 Mar 2015 at 1:13

GoogleCodeExporter commented 9 years ago
I solved this problem by redefining the nifty-scrollpanel#scrollpanel style 
with :

<style id="nifty-scrollpanel#scrollpanel">
    <attributes backgroundColor="#0000" />
        <effect overlay="true">
            <!-- <onActive name="blendMode" blendMode="multiply" post="true" /> -->
            <onActive name="imageOverlay" filename="blackborder.png" imageMode="resize:1,30,1,1,1,30,1,1,1,30,1,1" post="true" />
        </effect>
</style>
(basically desactiving the blendMode effect)

Original comment by lyrg...@gmail.com on 21 May 2015 at 8:14