Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How can I turn off draw() function?

edited April 2013 in General Posts: 2

Hi to everyone! I have a problem and really need your help. My project is about a game like monopoly and i don't need draw() function
which is called every frame because my game doesn't need to redraw anything. How can I turn it off?

Comments

  • Posts: 666

    I think you are confused - if you don't draw() then you won't see anything. That said, simply don't put any code inside draw() and it won't draw. Executing a blank function won't take a lot of time. You could try to remove draw() but again, you won't see anything.

    What you probably WANT to do is draw selectively, which means you might have to use drawmode of RETAINED so that you don't lose your previous screen, and put the code that you want to render the screen in a class, then put the class:draw() inside of main's draw().

  • Posts: 2

    Thanks a lot, I will try

Sign In or Register to comment.