Skip to content

Flipper Zero and Flipper One UI Guide ​

This guide walks you from an empty Lopaka canvas to working Flipper Zero and Flipper One C drawing code for FAP apps. Lopaka generates canvas_draw_* callbacks, 1-bit XBM icons, and frame-by-frame animation helpers — and can mirror your 128×64 design straight onto a USB-connected Flipper Zero with Live View.

What is the Flipper GUI Canvas API? ​

Flipper Zero apps (.fap packages built with ufbt) render onto a monochrome 128×64 LCD using the firmware's gui/canvas.h C API. Inside a ViewPort draw callback, your code receives a Canvas* canvas pointer and draws text, shapes, and XBM bitmaps.

See the official Flipper Zero developer documentation for the complete Canvas header reference.

Before you start ​

You need:

  • A Flipper Zero (or Flipper One target layout) and a USB-C cable if you want to use Live View.
  • ufbt (micro Flipper Build Tool) installed on your computer to compile .fap applications.
  • A Chromium-based browser (Chrome, Edge, Brave, Opera) if you plan to connect Flipper Live View via WebSerial.

WARNING

Close qFlipper and any open serial terminals before using Live View. Only one program can hold the Flipper USB serial port at a time.

Step 1: Create the Flipper project ​

  1. Open lopaka.app and create a project.
  2. Select Flipper Zero, One as the platform.
  3. Pick one of the four built-in display presets:
    • Zero Horizontal (128×64)
    • Zero Vertical (64×128)
    • One Horizontal (256×144)
    • One Vertical (144×256)

The editor displays monochrome black pixels on Flipper's signature #ff8200 orange backlight color.

Step 2: Preview on hardware with Live View ​

When designing a 128×64 Flipper Zero screen:

  1. Plug your Flipper Zero into your computer via USB and unlock it.
  2. Close qFlipper or any other tool connected to the Flipper serial port.
  3. Click Live View in the editor and select your Flipper Zero in the browser's WebSerial port picker.

Lopaka starts an RPC guiStartVirtualDisplay session and pushes your canvas frame to the physical Flipper screen as you edit. Click Disconnect when finished to return your Flipper to its normal menu.

Step 3: Design screens, icons, and animations ​

Supported drawing tools and Canvas API mapping ​

Rename layers before export: names become comments, image_<Name>_bits symbols, polygon helpers, animation header filenames, and optional variable names.

Lopaka layerGenerated Flipper C API
Linecanvas_draw_line(canvas, x1, y1, x2, y2)
Rectanglecanvas_draw_frame() / canvas_draw_box()
Rounded rectanglecanvas_draw_rframe() / canvas_draw_rbox()
Circlecanvas_draw_circle() / canvas_draw_disc()
Trianglecanvas_draw_triangle() (axis-aligned isosceles, even base) or three canvas_draw_line() calls
PolygonHelper void draw_<Name>(Canvas* canvas) calling closed canvas_draw_line() calls
Textcanvas_set_font(), optional canvas_set_font_direction(), canvas_draw_str()
Paint, icon, imagestatic const uint8_t image_<Name>_bits[] + canvas_draw_xbm()
Inverted layercanvas_set_color(canvas, 2) (XOR) / canvas_set_color(canvas, 1) (normal)
AnimationXBM frame headers + furi_get_tick() updateAnimations() / drawAnimations(canvas)

Lopaka calls canvas_set_bitmap_mode(canvas, true); at the start of the wrapped draw function so transparent background pixels in XBM icons do not overwrite shapes underneath.

Fixed system fonts and text rotation ​

Flipper firmware ships four system fonts — Lopaka exposes all four at exact 1:1 pixel metrics:

ConstantUnderlying faceBest used for
FontPrimaryHelvetica 8 boldTitles and menu headers
FontSecondaryHaxrcorp 4089Body text and labels
FontKeyboardProFont 11Monospace input / values
FontBigNumbersProFont 22Large numeric readouts

Custom font sizes and font uploads are not supported on Flipper. Text layers support native 0°, 90°, 180°, and 270° rotation via canvas_set_font_direction() (CanvasDirectionLeftToRight, CanvasDirectionTopToBottom, CanvasDirectionRightToLeft, CanvasDirectionBottomToTop).

XBM icons and frame-by-frame animations ​

  • Static icons: Import PNG, BMP, or SVG assets (or draw pixel-by-pixel with Paint). Lopaka outputs static const uint8_t image_<Name>_bits[] inline, or enable Include image files to emit #include "image_<Name>_bits.h" and download headers from Code Settings → Images. You can also convert standalone icons without an account in the free Image Converter.
  • Animations: Import a GIF, short video, or built-in animation, or edit frames in the free Animation Editor. With Animation helpers enabled, Lopaka emits:
    • #include "<name>.h" for each animation (download every .h from Code Settings → Animations).
    • updateAnimations() using furi_get_tick() and each layer's frame delay.
    • drawAnimations(Canvas* canvas) calling canvas_draw_xbm().
    • A void draw{ScreenName}(Canvas* canvas, void* context) callback with canvas_clear(canvas); and a starter runAnimationLoop(ViewPort* view_port).

Step 4: Configure Code Settings ​

SettingDefaultWhat it changes for Flipper
Wrapper functionOnWraps drawing calls in void draw{ScreenName}(Canvas* canvas)
Declare variablesOnExtracts dynamic properties into const char* / int declarations
Declare imagesOnEmits uint8_t XBM arrays for icon and paint layers
Include image filesOffEmits #include "image_<Name>_bits.h" instead of inline arrays
Animation helpersOnEmits .h animation includes, furi_get_tick() helpers, and loop stub
Comments, layer titlesOnAdds // <layer name> comments above each draw call

Step 5: Integrate into a Flipper FAP app ​

Copy Lopaka's generated C code into your FAP source file and call it from your ViewPort draw callback:

c
#include <furi.h>
#include <gui/gui.h>

// BEGIN LOPAKA GENERATED CODE
void drawMain(Canvas* canvas) {
    canvas_set_bitmap_mode(canvas, true);

    // Frame
    canvas_draw_rframe(canvas, 2, 2, 124, 60, 4);

    // Title
    canvas_set_font(canvas, FontPrimary);
    canvas_draw_str(canvas, 12, 22, "My Flipper App");

    // Hint
    canvas_set_font(canvas, FontSecondary);
    canvas_draw_str(canvas, 12, 42, "Press Back to exit");
}
// END LOPAKA GENERATED CODE

static void app_draw_callback(Canvas* canvas, void* ctx) {
    (void)ctx;
    canvas_clear(canvas);
    drawMain(canvas);
}

Register app_draw_callback with view_port_draw_callback_set(view_port, app_draw_callback, app), attach the viewport to RECORD_GUI, and build with ufbt.

If your screen contains animations, call updateAnimations() from a FuriTimer or your main event loop and trigger view_port_update(view_port) rather than spinning in an unthrottled while(true) loop so Back-button exit events remain responsive.

Lopaka handles vs. you handle ​

Lopaka handlesYou handle
128×64 / 256×144 pixel layout and live USB previewapplication.fam manifest and ufbt build setup
canvas_draw_* C code and text direction callsGui / ViewPort lifecycle and furi_record_open
1-bit XBM icon and animation .h exportsPlacing downloaded .h files in your FAP source folder
furi_get_tick() animation timing helpersInput callbacks, Back-button exit, and app state machine

Troubleshooting ​

Live View cannot find my Flipper Zero ​

  • Use a Chromium-based browser with WebSerial support (Safari and Firefox do not expose navigator.serial).
  • Close qFlipper, Flipper Lab, or serial monitors holding the USB port.
  • Use a data-capable USB cable, not a charge-only cable.

Animation header not found during ufbt build ​

Download every .h listed under Code Settings → Animations and place them beside your app's .c file so #include "<name>.h" resolves.

My animated app ignores the Back button ​

Do not block the main thread inside a tight while(true) loop without polling your FuriMessageQueue. Call updateAnimations() and view_port_update(view_port) on a periodic tick (for example every 30–50 ms) while checking input events.

Inverted shapes look wrong on top of other elements ​

Inverted layers emit canvas_set_color(canvas, 2) (XOR mode). Make sure the layers underneath are drawn earlier in the Layers list so XOR inverts the intended pixels.

FAQ ​

What screen resolutions does Lopaka support for Flipper Zero and Flipper One? ​

Lopaka includes four Flipper presets: Zero Horizontal (128×64), Zero Vertical (64×128), One Horizontal (256×144), and One Vertical (144×256).

Which fonts can I use on Flipper Zero? ​

Flipper Zero provides four fixed system fonts: FontPrimary (Helvetica 8 bold), FontSecondary (Haxrcorp 4089), FontKeyboard (ProFont 11), and FontBigNumbers (ProFont 22). Custom font uploads and arbitrary sizes are not supported.

How does Flipper Zero Live View work in Lopaka? ​

Connect your Flipper Zero over USB in a Chromium-based browser that supports WebSerial, close qFlipper or other serial tools, and click Live View. Lopaka opens a Flipper RPC virtual display session and mirrors your 128×64 canvas to the physical screen in real time.

How do I create Flipper Zero animations in Lopaka? ​

Import a GIF, video, or built-in animation into a Flipper project, or use the free Animation Editor. Lopaka exports 1-bit XBM frame headers (.h) and C helpers timed with furi_get_tick() plus a starter runAnimationLoop(ViewPort*) helper.

Does Lopaka build a complete .fap application? ​

No. Lopaka generates the Canvas C drawing callback, XBM icons, and animation helpers. You integrate those functions into a Flipper Application Package (FAP) with application.fam, ViewPort setup, input handling, and ufbt.

Where should I learn more? ​