Flipper Zero SimulatorDismantle, inspect and operate the device.
Interactive lab
Loading the Blender model…
0/50
ViewPorts draw into layers; the GUI service composites and flushes them to the LCD.
Module: Display and input
Operate the live main menu here: Up/Down moves, OK opens, Back returns.
ViewPort* vp = view_port_alloc();
view_port_draw_callback_set(vp, draw_cb, app);
view_port_input_callback_set(vp, input_cb, app);
gui_add_view_port(gui, vp, GuiLayerFullscreen);
What composes the layers?
← 11. Input events and the Back button · All lessons · 13. Haptics, LED and speaker →
Try it yourself
l12_menus_and_the_gui_stac.c
ViewPort* vp = view_port_alloc();
view_port_draw_callback_set(vp, draw_cb, app);
view_port_input_callback_set(vp, input_cb, app);
gui_add_view_port(gui, vp, GuiLayerFullscreen);