private int GetMaxListboxItems(MyGuiControlListbox listbox) { if (listbox == m_shipInventoryListBox) { return GetMaxInventoryItems(m_smallShipsBuilders[m_currentShipBuilderIndex].Builder.Inventory); } else if (listbox == m_otherSideInventoryListBox) { return GetMaxInventoryItems(m_otherSideInventoryBuilder); } else { return listbox.GetRowsCount() * listbox.GetColumsCount(); } }