Skip to content

Commit 9713453

Browse files
committed
fix trigger scroll
1 parent 4a6b676 commit 9713453

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

‎src/Battlescape/Camera.cpp‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,12 @@ void Camera::minMaxInt(int *value, const int minValue, const int maxValue) const
8787
*/
8888
void Camera::mousePress(Action *action, State *)
8989
{
90-
if (Options::battleDragScrollButton != SDL_BUTTON_MIDDLE || (SDL_GetMouseState(0,0)&SDL_BUTTON(Options::battleDragScrollButton)) == 0)
90+
if (action->getDetails()->button.button == SDL_BUTTON_LEFT && Options::battleEdgeScroll == SCROLL_TRIGGER)
91+
{
92+
_scrollTrigger = true;
93+
mouseOver(action, 0);
94+
}
95+
else if (Options::battleDragScrollButton != SDL_BUTTON_MIDDLE || (SDL_GetMouseState(0,0)&SDL_BUTTON(Options::battleDragScrollButton)) == 0)
9196
{
9297
if (action->getDetails()->button.button == SDL_BUTTON_WHEELUP)
9398
{
@@ -98,11 +103,6 @@ void Camera::mousePress(Action *action, State *)
98103
down();
99104
}
100105
}
101-
else if (action->getDetails()->button.button == SDL_BUTTON_LEFT && Options::battleEdgeScroll == SCROLL_TRIGGER)
102-
{
103-
_scrollTrigger = true;
104-
mouseOver(action, 0);
105-
}
106106
}
107107

108108
/**

0 commit comments

Comments
 (0)