Hi!,
I have a loop in the OnUpdate() method and inside the loop, before it finishes, I need to refresh the screen. My question is, there a way to call the OnRender() method manually to force a screen refresh?
Thanks.
There's no way you can call or force the OnRender method from OnUpdate method. The only possible way is to use a list to store your own custom draw instructions that you can deal with in the OnRender method. You also have to remember that SetUpdateRate affects how many times OnRender will be called,
You can probably do what you want with a flag - e.g. your OnUpdate method sets halfDone = True and exits, then next time it checks the status and does the other half.
If you want something as finicky as this, though, consider skipping OnUpdate() entirely and doing everything in sequential OnRenders.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.