KeplerBR

[FreeRCT] Using the scroll bar to change the position of sh2

Jul 21st, 2014
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.45 KB | None | 0 0
  1. Index: /home/r2d2/ApenasMeu/Dropbox/ProjectFreeRCT/src/ride_gui.cpp
  2. ===================================================================
  3. --- /home/r2d2/ApenasMeu/Dropbox/ProjectFreeRCT/src/ride_gui.cpp    (revisão 1237)
  4. +++ /home/r2d2/ApenasMeu/Dropbox/ProjectFreeRCT/src/ride_gui.cpp    (cópia de trabalho)
  5. @@ -555,6 +555,16 @@
  6.     }
  7.  }
  8.  
  9. +void ShopPlacementManager::OnMouseWheelEvent(Viewport* vp, int direction) {
  10. +   if (direction == -1) { // Scrollbar mouse moved downwards
  11. +       this->orientation = (TileEdge)((_shop_placer.orientation + 1) & 3);
  12. +   } else if (direction == 1) { // Scrollbar mouse moved upwards
  13. +       this->orientation = (TileEdge)((_shop_placer.orientation + 3) & 3);
  14. +   }
  15. +
  16. +   Rotated();
  17. +}
  18. +
  19.  void ShopPlacementManager::OnMouseMoveEvent(Viewport *vp, const Point16 &old_pos, const Point16 &pos)
  20.  {
  21.     this->mouse_pos = pos;
  22. Index: /home/r2d2/ApenasMeu/Dropbox/ProjectFreeRCT/src/shop_placement.h
  23. ===================================================================
  24. --- /home/r2d2/ApenasMeu/Dropbox/ProjectFreeRCT/src/shop_placement.h    (revisão 1237)
  25. +++ /home/r2d2/ApenasMeu/Dropbox/ProjectFreeRCT/src/shop_placement.h    (cópia de trabalho)
  26. @@ -44,6 +44,7 @@
  27.     void LeaveMode() override;
  28.     bool EnableCursors() override;
  29.  
  30. +   void OnMouseWheelEvent(Viewport* vp, int direction) override;
  31.     void OnMouseMoveEvent(Viewport *vp, const Point16 &old_pos, const Point16 &pos) override;
  32.     void OnMouseButtonEvent(Viewport *vp, uint8 state) override;
Add Comment
Please, Sign In to add comment