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>
30 lines
828 B
C++
30 lines
828 B
C++
#pragma once
|
|
|
|
#include <functional>
|
|
|
|
#include "activities/ActivityWithSubactivity.h"
|
|
#include "util/ButtonNavigator.h"
|
|
|
|
/**
|
|
* Submenu for OPDS Browser settings.
|
|
* Shows OPDS Server URL and HTTP authentication options.
|
|
*/
|
|
class CalibreSettingsActivity final : public ActivityWithSubactivity {
|
|
public:
|
|
explicit CalibreSettingsActivity(GfxRenderer& renderer, MappedInputManager& mappedInput,
|
|
const std::function<void()>& onBack)
|
|
: ActivityWithSubactivity("CalibreSettings", 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();
|
|
};
|