diff options
| author | Michele Bini <michele.bini@gmail.com> | 2022-03-27 20:41:04 (GMT) |
|---|---|---|
| committer | Michele Bini <michele.bini@gmail.com> | 2022-03-27 20:41:04 (GMT) |
| commit | a2b714f9f8b48f85e345b7aa5b57b4cbda667ffe (patch) | |
| tree | 01992de18a9fe6c1372f12123adfd40a9109f9ee /src/displayapp/screens/FlashLight.h | |
| parent | 4f81b59e2cd453c1a9422fb1f45d2cd27d52b2a3 (diff) | |
| parent | 2fb00c8d012837af7afa93add7d895a34a588cab (diff) | |
Merge ../../InfiniTime into ultraredux
# Conflicts:
# src/displayapp/screens/WatchFaceDigital.cpp
Diffstat (limited to 'src/displayapp/screens/FlashLight.h')
| -rw-r--r-- | src/displayapp/screens/FlashLight.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/displayapp/screens/FlashLight.h b/src/displayapp/screens/FlashLight.h new file mode 100644 index 0000000..e91a103 --- /dev/null +++ b/src/displayapp/screens/FlashLight.h @@ -0,0 +1,38 @@ +#pragma once + +#include "displayapp/screens/Screen.h" +#include "components/brightness/BrightnessController.h" +#include "systemtask/SystemTask.h" +#include <cstdint> +#include <lvgl/lvgl.h> + +namespace Pinetime { + + namespace Applications { + namespace Screens { + + class FlashLight : public Screen { + public: + FlashLight(DisplayApp* app, System::SystemTask& systemTask, Controllers::BrightnessController& brightness); + ~FlashLight() override; + + bool OnTouchEvent(Pinetime::Applications::TouchEvents event) override; + void OnClickEvent(lv_obj_t* obj, lv_event_t event); + + private: + void SetIndicators(); + void SetColors(); + + Pinetime::System::SystemTask& systemTask; + Controllers::BrightnessController& brightnessController; + + Controllers::BrightnessController::Levels brightnessLevel; + + lv_obj_t* flashLight; + lv_obj_t* backgroundAction; + lv_obj_t* indicators[3]; + bool isOn = false; + }; + } + } +} |
