a75279c96c
* New Apps - Lot 1 Trying to mix it up a little with some fun, useful and just weird. Adds more new apps... Brainfuck Breakout Magic 8 Ball Todo List Also re-organised the app name part of main.yml * Fix build? * fixes * and some more * Update Brainfuck.cpp * i heard you like fixes with your fixes * no hard coded paths
27 lines
544 B
C++
27 lines
544 B
C++
#pragma once
|
|
|
|
#include <lvgl.h>
|
|
#include <TactilityCpp/App.h>
|
|
|
|
class Magic8Ball final : public App {
|
|
|
|
private:
|
|
// UI pointers (nulled in onHide)
|
|
lv_obj_t* answerLabel = nullptr;
|
|
lv_obj_t* hintLabel = nullptr;
|
|
lv_obj_t* ballObj = nullptr;
|
|
|
|
// State
|
|
int lastIdx = -1;
|
|
bool seeded = false;
|
|
|
|
void revealAnswer();
|
|
|
|
static void onBallClick(lv_event_t* e);
|
|
static void onKey(lv_event_t* e);
|
|
|
|
public:
|
|
void onShow(AppHandle context, lv_obj_t* parent) override;
|
|
void onHide(AppHandle context) override;
|
|
};
|