Hi!
Sorry, I din’t find an answer to my easy question, and I didn’t find any tutorials about that. I generate a dynamic Inventory screen by java which works quite well, but now I want to add some effects to my new Panels/etc., but I didn’t find any working solution for doing that. My Code so far:
[java]
Element thisElement=screen.findElementByName(“itemField_inner#”+1);
ColorPulsate pulsateEffect = new ColorPulsate();
Properties properties = new Properties();
properties.put( “startColor” , “#f418” );
properties.put( “endColor” , “#f638” );
properties.put( “pulsateType” , “sin” );
properties.put( “period” , “2500” );
properties.put( “cycle” , “false” );
EffectProperties prop = new EffectProperties(properties);
pulsateEffect.activate( nifty, thisElement, prop );
pulsateEffect.execute(thisElement, 1, new Falloff(), nifty.getRenderEngine());
Effect effect = new Effect( nifty, false, false, false, "", "", "", true, EffectEventId.onStartHover);
effect.init( thisElement, pulsateEffect, prop, new TimeProvider(), new LinkedList() );
thisElement.registerEffect(EffectEventId.onStartHover, effect);
effect.enableInfinite();[/java]
Could anyone give me a simple working example of how I could add this effect? Thank you very much!