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

row() public method

Indicates that subsequent cells should be added to a new row and returns the cell values that will be used as the defaults for all cells in the new row.
public row ( ) : Cell
return Cell
		public Cell row()
		{
			if( _cells.Count > 0 )
			{
				endRow();
				invalidate();
			}

			if( _rowDefaults != null )
				Pool<Cell>.free( _rowDefaults );
			
			_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();
			}
		}
All Usage Examples Of Nez.UI.Table::row