| 882 | } |
| 883 | |
| 884 | void ModMatrixComponent::resized() { |
| 885 | GET_LOCAL_AREA(m_clear_button0, "MatrixClearButton"); |
| 886 | GET_LOCAL_AREA(m_source[0], "MatrixSource"); |
| 887 | GET_LOCAL_AREA(m_amount_1[0], "MatrixAmount1"); |
| 888 | GET_LOCAL_AREA(m_amount_2[0], "MatrixAmount2"); |
| 889 | GET_LOCAL_AREA(m_amount_3[0], "MatrixAmount3"); |
| 890 | GET_LOCAL_AREA(m_dest_1[0], "MatrixDest1"); |
| 891 | GET_LOCAL_AREA(m_dest_2[0], "MatrixDest2"); |
| 892 | GET_LOCAL_AREA(m_scale[0], "MatrixScale"); |
| 893 | |
| 894 | std::array<juce::Component *, 9> clear_buttons = { |
| 895 | &m_clear_button0, &m_clear_button1, &m_clear_button2, &m_clear_button3, &m_clear_button4, &m_clear_button5, &m_clear_button6, &m_clear_button7, &m_clear_button8}; |
| 896 | |
| 897 | const auto h = m_source[0].getHeight(); |
| 898 | for (int i = 1; i < 9; ++i) { |
| 899 | clear_buttons[i]->setBounds(clear_buttons[i - 1]->getBounds().translated(0, h)); |
| 900 | m_source[i].setBounds(m_source[i - 1].getBounds().translated(0, h)); |
| 901 | m_amount_1[i].setBounds(m_amount_1[i - 1].getBounds().translated(0, h)); |
| 902 | m_amount_2[i].setBounds(m_amount_2[i - 1].getBounds().translated(0, h)); |
| 903 | m_amount_3[i].setBounds(m_amount_3[i - 1].getBounds().translated(0, h)); |
| 904 | m_dest_1[i].setBounds(m_dest_1[i - 1].getBounds().translated(0, h)); |
| 905 | m_dest_2[i].setBounds(m_dest_2[i - 1].getBounds().translated(0, h)); |
| 906 | m_scale[i].setBounds(m_scale[i - 1].getBounds().translated(0, h)); |
| 907 | } |
| 908 | } |