Implements Lyra theme for some more Crosspoint screens:       - A bit of refactoring for list scrolling logic --- While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? _**NO**_ --------- Co-authored-by: Dave Allie <dave@daveallie.com>
31 lines
831 B
C++
31 lines
831 B
C++
#pragma once
|
|
|
|
#include <functional>
|
|
|
|
#include "activities/ActivityWithSubactivity.h"
|
|
#include "util/ButtonNavigator.h"
|
|
|
|
/**
|
|
* Submenu for KOReader Sync settings.
|
|
* Shows username, password, and authenticate options.
|
|
*/
|
|
class KOReaderSettingsActivity final : public ActivityWithSubactivity {
|
|
public:
|
|
explicit KOReaderSettingsActivity(GfxRenderer& renderer, MappedInputManager& mappedInput,
|
|
const std::function<void()>& onBack)
|
|
: ActivityWithSubactivity("KOReaderSettings", renderer, mappedInput), onBack(onBack) {}
|
|
|
|
void onEnter() override;
|
|
void onExit() override;
|
|
void loop() override;
|
|
void render(Activity::RenderLock&&) override;
|
|
|
|
private:
|
|
ButtonNavigator buttonNavigator;
|
|
|
|
size_t selectedIndex = 0;
|
|
const std::function<void()> onBack;
|
|
|
|
void handleSelection();
|
|
};
|