void mousePressed(){ if (mouseButton == LEFT){ V_INPUT.activate_keyboardInput(); LAMBDA_INPUT.activate_keyboardInput(); RELATIVITY_INPUT.activate_menu(); START.position(); PAUSE.position(); CHANGE_COLOUR.position(); } } void mouseReleased(){ if (mouseButton == LEFT){ //If mouse is released on the drop down menu, update relativity boolean if (RELATIVITY_INPUT.return_value()!=-1){ if (RELATIVITY_INPUT.return_value()==0){ relativity = true; } else { relativity = false; } RELATIVITY_INPUT.close_menu(); } if (START.return_value()==true){ startSimulation = !startSimulation; if (startSimulation == false){ x = 0; t = 0; v = 0; for (int i = Waves.size()-1; i>=0; i--){ Waves.remove(i); } gamma = 0; pause = false; } } START.return_position(); if (PAUSE.return_value()==true){ pause = !pause; } //If mouse is released on change colour button, increament the pointer if (CHANGE_COLOUR.return_value()==true){ colourPointer ++; if (colourPointer == 3){ colourPointer = 0; } } CHANGE_COLOUR.return_position(); } } void keyPressed(){ V_INPUT.keyboard_input(); LAMBDA_INPUT.keyboard_input(); }