Thursday, August 10, 2006

Just scrolling around...

Scrolling around the map now works, and it works quite good.

Implementing it was fairly easy. Check if the mouse cursor is 16 pixels off the edge of the screen, and then check if the viewport wasn't at it's minimum/maximum on that side. Then, do the actual scrolling based on the scrolling timer.

The scrolling timer makes it possible to change the scrolling speed in some form of settings dialog. Also, if there is some actual scrolling done, the mouse cursor neatly changes into an arrow and all other actions are ignored(Such as selecting/attacking).

And I made the console react to the tilde key to hide/show it. Now I really need to start working on the render layers, because my units are all messed up now with rendering.

1 comment:

Anonymous said...

Sleep with me