File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -548,16 +548,26 @@ public override void OnRightClick(InputEventArgs inputEventArgs)
548548 {
549549 inputEventArgs . Handled = true ;
550550
551- if ( CursorAction != null && ! isRightClickScrolling )
551+ if ( isRightClickScrolling )
552+ {
553+ StopRightClickScrolling ( ) ;
554+ }
555+ else if ( CursorAction != null )
552556 {
553557 CursorAction = null ;
554558 }
555559
556- isRightClickScrolling = false ;
560+ StopRightClickScrolling ( ) ;
557561
558562 base . OnRightClick ( inputEventArgs ) ;
559563 }
560564
565+ private void StopRightClickScrolling ( )
566+ {
567+ isRightClickScrolling = false ;
568+ rightClickScrollInitPos = new Point ( - 1 , - 1 ) ;
569+ }
570+
561571 private MapTile CalculateBestTileUnderCursor ( )
562572 {
563573 Point2D cursorMapPoint = GetCursorMapPoint ( ) ;
@@ -613,6 +623,10 @@ public override void Update(GameTime gameTime)
613623 }
614624 }
615625 }
626+ else if ( isRightClickScrolling )
627+ {
628+ StopRightClickScrolling ( ) ;
629+ }
616630
617631 if ( leftPressedDownOnControl && ! Cursor . LeftDown )
618632 leftPressedDownOnControl = false ;
You can’t perform that action at this time.
0 commit comments