I have an application where I'd like to use "modal" graphics windows that accept user input. I can create widgets using my own classes on top of ugfx just fine, but that ends up with the following pseudo-code loop:
so whatever I actually want to do in a modal window has to fit into that scheme. For example, I can't simply
because that would need to update input and graphics in the background. Using an RTOS comes to mind, but that seems to be overkill. I've read a bit about coroutines and their siblings, but what pattern or library can you actually recommend? Or should I really go for an RTOS?
Regards
Christoph
Code:
app::run()
update_input();
update_gfx();
Code:
btn = getButtonWindow("Press a button"); // open a window showing the given message and wait until a button has been pressed
Regards
Christoph