Introduce BookSettings utility for per-book settings stored in the book's cache directory (book_settings.bin). Add "Letterbox Fill" option to the EPUB reader menu that cycles Default/Dithered/Solid/None. At sleep time, the per-book override is loaded and takes precedence over the global setting for all book types (EPUB, XTC, TXT). Co-authored-by: Cursor <cursoragent@cursor.com>
24 lines
722 B
C++
24 lines
722 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
|
|
#include "../Activity.h"
|
|
|
|
class Bitmap;
|
|
|
|
class SleepActivity final : public Activity {
|
|
public:
|
|
explicit SleepActivity(GfxRenderer& renderer, MappedInputManager& mappedInput)
|
|
: Activity("Sleep", renderer, mappedInput) {}
|
|
void onEnter() override;
|
|
|
|
private:
|
|
void renderDefaultSleepScreen() const;
|
|
void renderCustomSleepScreen() const;
|
|
void renderCoverSleepScreen() const;
|
|
// fillModeOverride: 0xFF = use global setting, otherwise a SLEEP_SCREEN_LETTERBOX_FILL value.
|
|
void renderBitmapSleepScreen(const Bitmap& bitmap, const std::string& edgeCachePath = "",
|
|
uint8_t fillModeOverride = 0xFF) const;
|
|
void renderBlankSleepScreen() const;
|
|
};
|