Re: Phix While Loop Inside pGUI Main Loop
- Posted by euphoric (admin) May 29, 2020
- 2245 views
euphoric said...
Pete, is there a way to run a while loop inside pGUI's main thread?
For example, if I wanted to do a high-frame FPS game with GL or somesuch, I'd need a simple while loop inside to manage game state, etc. Is that possible?
I finally stumbled upon the answer while updating some prior code:
Define the Iup IDLE_ACTION function:
IupSetGlobalFunction("IDLE_ACTION", Icallback("idle_cb"))
That function will be called constantly, when no other events are happening.
Pete, you might want to at least make some reference to this functionality in the Phix/pGUI docs. You also have an example that uses it, gears.exw!