Something went wrong. Try again.
A fork of https://github.com/crosspoint-reader/crosspoint-reader
Something went wrong. Try again.
868 B · 27 lines
C
at master
12345678910111213141516171819202122232425262728#pragma once#include <Xtc.h>
#include <memory>
#include "../Activity.h"#include "util/ButtonNavigator.h"
class XtcReaderChapterSelectionActivity final : public Activity { std::shared_ptr<Xtc> xtc; ButtonNavigator buttonNavigator; uint32_t currentPage = 0; int selectorIndex = 0;
int getPageItems() const; int findChapterIndexForPage(uint32_t page) const;
public: explicit XtcReaderChapterSelectionActivity(GfxRenderer& renderer, MappedInputManager& mappedInput, const std::shared_ptr<Xtc>& xtc, uint32_t currentPage) : Activity("XtcReaderChapterSelection", renderer, mappedInput), xtc(xtc), currentPage(currentPage) {} void onEnter() override; void onExit() override; void loop() override; void render(RenderLock&&) override; bool isReaderActivity() const override { return true; }};