Add bookinfo

This commit is contained in:
jpirnay
2026-03-07 18:07:49 +01:00
parent 3ed96a7e49
commit 10e0680f6e
4 changed files with 313 additions and 56 deletions
+31
View File
@@ -0,0 +1,31 @@
#pragma once
#include <string>
#include <vector>
#include "../Activity.h"
class BookInfoActivity final : public Activity {
const std::string filePath;
// Metadata populated in onEnter
std::string title;
std::string author;
std::string series;
std::string seriesIndex;
std::string description;
std::string coverBmpPath;
size_t fileSizeBytes = 0;
static std::string formatFileSize(size_t bytes);
void renderLoading();
void loadData();
public:
explicit BookInfoActivity(GfxRenderer& renderer, MappedInputManager& mappedInput, std::string filePath)
: Activity("BookInfo", renderer, mappedInput), filePath(std::move(filePath)) {}
void onEnter() override;
void loop() override;
void render(RenderLock&&) override;
};