Nez.UI.Table.getRowDefaults C# (CSharp) Method

getRowDefaults() public method

gets the current Cell defaults. This is the same value returned by a call to row()
public getRowDefaults ( ) : Cell
return Cell
		public Cell getRowDefaults()
		{
			if( _rowDefaults == null )
			{
				_rowDefaults = Pool<Cell>.obtain();
				_rowDefaults.clear();
			}

			return _rowDefaults;
		}

Usage Example

コード例 #1
0
ファイル: InspectorList.cs プロジェクト: RastaCow/Nez
		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();
			}
		}