Creating multiscreen GUI #2621
-
Hi, I am not satisfied with solution I came to. Now to switch between navigation windows I did the following
and in periodic buttons handling I just broadcast button events to all fields of current form, even if they are not selectable
to do so, I made Best, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I have created a C-Code example here (transfer to Arduino C++ should be easy): https://github.com/olikraus/u8g2/blob/master/sys/sdl/mui_static_pages/main.c The basic idea is to have two different event loops:
The normal event loop should look like this: u8g2/sys/sdl/mui_static_pages/main.c Lines 156 to 161 in dc42d10 The special event loop will be called if any of the static pages is visible (in this case: if the form id is between 10 and 12): u8g2/sys/sdl/mui_static_pages/main.c Lines 132 to 152 in 1e92781 For the special event loop the prev and next buttons will just cycle through the pages by directly setting the form id. |
Beta Was this translation helpful? Give feedback.
-
Thank you. That is exactly what I was looking for. |
Beta Was this translation helpful? Give feedback.
I have created a C-Code example here (transfer to Arduino C++ should be easy): https://github.com/olikraus/u8g2/blob/master/sys/sdl/mui_static_pages/main.c
The basic idea is to have two different event loops:
The normal event loop should look like this:
u8g2/sys/sdl/mui_static_pages/main.c
Lines 156 to 161 in dc42d10
The special event loop will be called if any of the static pages is visible (in this case: if the form…