button prompt

master
Felix Pankratz 2 years ago
parent 0518c6e382
commit 06a16410e9

@ -1,6 +1,7 @@
#include <furi.h>
#include <furi_hal.h>
#include <gui/gui.h>
#include <gui/elements.h>
#include <input/input.h>
#include <m-string.h>
#include <stdlib.h>
@ -51,9 +52,14 @@ static void render_callback(Canvas* const canvas, void* ctx) {
// draw BPM value
string_printf(tempStr, "%.2f", metronome_state->bpm);
canvas_set_font(canvas, FontBigNumbers);
canvas_draw_str_aligned(canvas, 64, 40, AlignCenter, AlignCenter, string_get_cstr(tempStr));
canvas_draw_str_aligned(canvas, 64, 32, AlignCenter, AlignCenter, string_get_cstr(tempStr));
string_reset(tempStr);
// draw button prompts
canvas_set_font(canvas, FontSecondary);
elements_button_left(canvas, "Slower");
elements_button_right(canvas, "Faster");
string_clear(tempStr);
release_mutex((ValueMutex*)ctx, metronome_state);
}

Loading…
Cancel
Save