Sign in to follow this  

[.net] [C#] Timer for continuous updating?

Recommended Posts

I'm writing an editor of sorts, and I am able to move the view with the mouse. The problem is that I'm not sure how to get it to move continually. Since the view is 2d and will only be made up of geometric shapes and text, there's no need to continually update everything, not will I need to continually draw everything. Rather, only when something changes. But when moving the view around, I have it set so clicking and dragging the mouse will create a vector (direction and length) that the view will move along, as long as the mouse button is held down. But the way the code is now, it only moves the view when the mouse does because I only update the movement in the update function, which is only called when a change is made (which includes the user moving the mouse). Should I create a Timer object and use the 'Tick' event? How else should I get this continuous updating?

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this