Scrolling on a canvas
BlitzMax Forums/MaxGUI Module/Scrolling on a canvas
| ||
Can anyone make this code work so that it scrolls smoothly ? - at the moment it scrolls but it lags |
| ||
What are you trying to accomplish? It seems to scroll fairly consistently, as long as you keep moving the mouse. Is that how you want it to behave, or should it continue scolling without mouse movement as well? |
| ||
The ultimate solution would be a rewrite I'm afraid.. What you want is an event-hooked function or method in a type which updates the map according to a given timer (which is also event-hooked).. |
| ||
@xlsior I'm trying to get it so that when the mouse is at the edge of the screen the image scrolls and when the mouse isnt at the edge of the screen it dosent scroll. But I can't get it to scroll smoothly its all jerky. |
| ||
Event-hooks and timers are what you want.. really.. |
| ||
First you could may split the mouse movement and the scrolling. The mouse move event set the scroll direction and the timer updates the canvas. try this quick hack: |
| ||
@JSP Thankyou. It works! |