Laser Squad [Day 36] – Map auto scrolling

Today I wanted to implement the map auto scrolling feature. It’s the next logical thing to implement when you have a large map and the zoom factor set to maximum value. The idea was when a unit is moving, it has to be always centered in the middle of the screen; also when you select the “next unit” option, the map should auto scroll to this unit. This is how the original game works.

Unfortunately, something is not working right. When I pass moving events to the text view, it’s not scrolling at all. I googled a while, trying to find a reasonable explanation or example, but with no success. This is the first feature in this project that isn’t working, and I can’t find a working solution.

Well, I’m skipping this one, hoping that I’ll fix it some other day.

* * * * *