@Override
public void onStartScreen() {
nifty.gotoScreen("demo");
}
});
layer(new LayerBuilder("layer") {{
childLayoutCenter();
onStartScreenEffect(new EffectBuilder("fade") {{
length(3000);
effectParameter("start", "#0");
effectParameter("end", "#f");
}});
onStartScreenEffect(new EffectBuilder("playSound") {{
startDelay(1400);
effectParameter("sound", "intro");
}});
onActiveEffect(new EffectBuilder("gradient") {{
effectValue("offset", "0%", "color", "#66666fff");
effectValue("offset", "85%", "color", "#000f");
effectValue("offset", "100%", "color", "#44444fff");
}});
panel(new PanelBuilder() {{
alignCenter();
valignCenter();
childLayoutHorizontal();
width("856px");
panel(new PanelBuilder() {{
width("300px");
height("256px");
childLayoutCenter();
text(new TextBuilder() {{
text("Nifty 1.3 Core");
style("base-font");
alignCenter();
valignCenter();
onStartScreenEffect(new EffectBuilder("fade") {{
length(1000);
effectValue("time", "1700", "value", "0.0");
effectValue("time", "2000", "value", "1.0");
effectValue("time", "2600", "value", "1.0");
effectValue("time", "3200", "value", "0.0");
post(false);
neverStopRendering(true);
}});
}});
}});
panel(new PanelBuilder() {{
alignCenter();
valignCenter();
childLayoutOverlay();
width("256px");
height("256px");
onStartScreenEffect(new EffectBuilder("shake") {{
length(250);
startDelay(1300);
inherit();
effectParameter("global", "false");
effectParameter("distance", "10.");
}});
onStartScreenEffect(new EffectBuilder("imageSize") {{
length(600);
startDelay(3000);
effectParameter("startSize", "1.0");
effectParameter("endSize", "2.0");
inherit();
neverStopRendering(true);
}});
onStartScreenEffect(new EffectBuilder("fade") {{
length(600);
startDelay(3000);
effectParameter("start", "#f");
effectParameter("end", "#0");
inherit();
neverStopRendering(true);
}});
image(new ImageBuilder() {{
filename("yin.png");
onStartScreenEffect(new EffectBuilder("move") {{
length(1000);
startDelay(300);
timeType("exp");
effectParameter("factor", "6.f");
effectParameter("mode", "in");
effectParameter("direction", "left");
}});
}});
image(new ImageBuilder() {{
filename("yang.png");
onStartScreenEffect(new EffectBuilder("move") {{
length(1000);
startDelay(300);
timeType("exp");
effectParameter("factor", "6.f");
effectParameter("mode", "in");
effectParameter("direction", "right");
}});
}});
}});
panel(new PanelBuilder() {{
width("300px");
height("256px");
childLayoutCenter();
text(new TextBuilder() {{
text("Nifty 1.3 Standard Controls");
style("base-font");
alignCenter();
valignCenter();
onStartScreenEffect(new EffectBuilder("fade") {{
length(1000);
effectValue("time", "1700", "value", "0.0");
effectValue("time", "2000", "value", "1.0");
effectValue("time", "2600", "value", "1.0");
effectValue("time", "3200", "value", "0.0");
post(false);
neverStopRendering(true);
}});
}});
}});
}});
}});
layer(new LayerBuilder() {{
backgroundColor("#ddff");
onStartScreenEffect(new EffectBuilder("fade") {{
length(1000);
startDelay(3000);
effectParameter("start", "#0");