return t;
}
private Table buildVignettingWidgets() {
final CheckBox cbVignette = ResourceFactory.newCheckBox( " Vignetting", post.vignette.isEnabled(), new ClickListener() {
@Override
public void clicked( InputEvent event, float x, float y ) {
CheckBox source = (CheckBox)event.getListenerActor();
post.vignette.setEnabled( source.isChecked() );
}
} );
final Slider slVignetteI = ResourceFactory.newSlider( 0, 1f, 0.01f, post.vignette.getIntensity(), new ChangeListener() {
@Override
public void changed( ChangeEvent event, Actor actor ) {
Slider source = (Slider)event.getListenerActor();
post.vignette.setIntensity( source.getValue() );
}
} );
final SelectBox<String> sbGradientMap = ResourceFactory.newSelectBox( new String[] { "Cross processing ", "Sunset ",
"Mars", "Vivid ", "Greenland ", "Cloudy ", "Muddy " }, new ChangeListener() {
@Override
public void changed( ChangeEvent event, Actor actor ) {
if( post.vignette.isGradientMappingEnabled() ) {
SelectBox<String> source = (SelectBox)actor;
switch( source.getSelectedIndex() ) {
case 0:
post.vignette.setLutIndexVal( 0, 16 );
break;
case 1:
post.vignette.setLutIndexVal( 0, 5 );
break;
case 2:
post.vignette.setLutIndexVal( 0, 7 );
break;
case 3:
post.vignette.setLutIndexVal( 0, 6 );
break;
case 4:
post.vignette.setLutIndexVal( 0, 8 );
break;
case 5:
post.vignette.setLutIndexVal( 0, 3 );
break;
case 6:
post.vignette.setLutIndexVal( 0, 0 );
break;
}
}
}
} );
sbGradientMap.setSelectedIndex( DefaultGradientMap );
selectBoxes.add( sbGradientMap );
final CheckBox cbGradientMapping = ResourceFactory.newCheckBox( " Perform gradient mapping",
post.vignette.isGradientMappingEnabled(), new ClickListener() {
@Override
public void clicked( InputEvent event, float x, float y ) {
CheckBox source = (CheckBox)event.getListenerActor();
if( source.isChecked() ) {
post.vignette.setLutTexture( ResourceFactory.newTexture( "gradient-mapping.png", false ) );