Start With The Basics - The Rendering LoopI'm going to start at the top, by defining a function that will calculate and draw one frame of our GUI system. Let's call this function RenderGUI(). In PDL, RenderGUI does something like this:
Pretty straightforward for now. Basically, we grab the new position and status of the mouse cursor, calculate any changes that are caused by the new data, render all our windows, render the mouse cursor, then push the whole thing to the screen.
|
||||||||||||||||||||