public void initialize( Table table, Skin skin )
{
table.getRowDefaults().setPadTop( 10 );
table.add( name.Replace( "PostProcessor", string.Empty ) ).getElement<Label>().setFontScale( 1f ).setFontColor( new Color( 241, 156, 0 ) );
// if we have a component, stick a bool for enabled here
if( target != null )
{
_enabledCheckbox = new CheckBox( string.Empty, skin );
_enabledCheckbox.programmaticChangeEvents = false;
if( target is Component )
_enabledCheckbox.isChecked = ( (Component)target ).enabled;
else if( target is PostProcessor )
_enabledCheckbox.isChecked = ((PostProcessor)target ).enabled;
_enabledCheckbox.onChanged += newValue =>
{
if( target is Component )
((Component)target).enabled = newValue;
else if( target is PostProcessor )
( (PostProcessor)target ).enabled = newValue;
};
table.add( _enabledCheckbox ).right();
}
table.row();
foreach( var i in _inspectors )
{
i.initialize( table, skin );
table.row();
}
}