patch-src_GUI_dune_InGameSettingsMenu_cpp 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. $OpenBSD: patch-src_GUI_dune_InGameSettingsMenu_cpp,v 1.1.1.1 2014/05/29 08:31:26 kirby Exp $
  2. Increase maximum scroll speed.
  3. From upstream: 4907d69135ac5bd3d850b449799e438d4290a3c2
  4. --- src/GUI/dune/InGameSettingsMenu.cpp.orig Mon Feb 25 22:24:01 2013
  5. +++ src/GUI/dune/InGameSettingsMenu.cpp Mon May 26 08:54:27 2014
  6. @@ -122,7 +122,7 @@ void InGameSettingsMenu::init() {
  7. volumeBar.setProgress((100.0*volume)/MIX_MAX_VOLUME);
  8. scrollSpeed = screenborder->getScrollSpeed();
  9. - scrollSpeedBar.setProgress((scrollSpeed-2.0)*5.0);
  10. + scrollSpeedBar.setProgress((scrollSpeed-2.0)*2.0);
  11. }
  12. bool InGameSettingsMenu::handleKeyPress(SDL_KeyboardEvent& key) {
  13. @@ -199,15 +199,15 @@ void InGameSettingsMenu::onVolumeMinus() {
  14. }
  15. void InGameSettingsMenu::onScrollSpeedPlus() {
  16. - if(scrollSpeed < 21) {
  17. + if(scrollSpeed < 51) {
  18. scrollSpeed += 2;
  19. - scrollSpeedBar.setProgress((scrollSpeed-2)*5.0);
  20. + scrollSpeedBar.setProgress((scrollSpeed-2)*2.0);
  21. }
  22. }
  23. void InGameSettingsMenu::onScrollSpeedMinus() {
  24. if(scrollSpeed > 3) {
  25. scrollSpeed -= 2;
  26. - scrollSpeedBar.setProgress((scrollSpeed-2)*5.0);
  27. + scrollSpeedBar.setProgress((scrollSpeed-2)*2.0);
  28. }
  29. }