| 380 | } |
| 381 | |
| 382 | void onUpdate(float /*time*/, float x, float y) override |
| 383 | { |
| 384 | m_amplitude = std::clamp(0.2f * (1.f - y), 0.f, 0.2f); |
| 385 | m_frequency = std::clamp(500.f * x, 0.f, 500.f); |
| 386 | |
| 387 | m_currentAmplitude.setString("Amplitude: " + std::to_string(m_amplitude)); |
| 388 | m_currentFrequency.setString("Frequency: " + std::to_string(m_frequency) + " Hz"); |
| 389 | } |
| 390 | |
| 391 | void onDraw(sf::RenderTarget& target, sf::RenderStates states) const override |
| 392 | { |