Wow, I think you all missed what I meant. I understand how animation works, but if you only get control during an action like OnClick, how do you update the position?
So you click on the deal button, so there is an OnClick event, but since you don't click on anything to keep the animation going ( updating position ) then how does it work?
In C++, you have access to the main message loop, cause you create it. Which means you can update the objects before or after the actually message processing...like how the chili framework has the game.Go() function.
Win32 programming...not as fun.
-
- Posts: 4373
- Joined: February 28th, 2013, 3:23 am
- Location: Oklahoma, United States
Re: Win32 programming...not as fun.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com
-
- Posts: 4373
- Joined: February 28th, 2013, 3:23 am
- Location: Oklahoma, United States
Re: Win32 programming...not as fun.
Yeah I know how to create the visual forms in VS and adjust the position, labels, font sizes and all that, that was never my concern.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com
-
- Posts: 4373
- Joined: February 28th, 2013, 3:23 am
- Location: Oklahoma, United States
Re: Win32 programming...not as fun.
I guess what I don't understand in C# is, if you don't have access to the message loop, where do you do X ever Y.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com
Re: Win32 programming...not as fun.
Like I said, use a timer brah.albinopapa wrote:Wow, I think you all missed what I meant. I understand how animation works, but if you only get control during an action like OnClick, how do you update the position?
So you click on the deal button, so there is an OnClick event, but since you don't click on anything to keep the animation going ( updating position ) then how does it work?
In C++, you have access to the main message loop, cause you create it. Which means you can update the objects before or after the actually message processing...like how the chili framework has the game.Go() function.
Chili
Re: Win32 programming...not as fun.
I believe what you're looking for is the tick event of the timer. Each time it ticks you can update the position of the cards, then stop the timer after a certain number of ticks or after all cards have reached their final position.
-
- Posts: 4373
- Joined: February 28th, 2013, 3:23 am
- Location: Oklahoma, United States
Re: Win32 programming...not as fun.
Thanks chili and JDB, I wasn't comprehending that the timer you were referring to was part of the framework with events. I will look further.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com
Re: Win32 programming...not as fun.
When I did it, i think i just dragged a 'Timer' control from the toolbox onto the forms designer.
Double click it and it will create a tick event handler function for you.
Double click it and it will create a tick event handler function for you.
Chili