#pragma once #include #include #include #include #include "../ActivityWithSubactivity.h" #include "util/ButtonNavigator.h" class EpubReaderFootnotesActivity final : public ActivityWithSubactivity { public: explicit EpubReaderFootnotesActivity(GfxRenderer& renderer, MappedInputManager& mappedInput, const std::vector& footnotes, const std::function& onGoBack, const std::function& onSelectFootnote) : ActivityWithSubactivity("EpubReaderFootnotes", renderer, mappedInput), footnotes(footnotes), onGoBack(onGoBack), onSelectFootnote(onSelectFootnote) {} void onEnter() override; void onExit() override; void loop() override; void render(Activity::RenderLock&&) override; private: const std::vector& footnotes; const std::function onGoBack; const std::function onSelectFootnote; int selectedIndex = 0; int scrollOffset = 0; ButtonNavigator buttonNavigator; };