36 lines
1.1 KiB
C
36 lines
1.1 KiB
C
|
|
#pragma once
|
||
|
|
|
||
|
|
#include <string>
|
||
|
|
#include <vector>
|
||
|
|
|
||
|
|
#include "activities/Activity.h"
|
||
|
|
#include "util/ButtonNavigator.h"
|
||
|
|
|
||
|
|
class DictionarySuggestionsActivity final : public Activity {
|
||
|
|
public:
|
||
|
|
explicit DictionarySuggestionsActivity(GfxRenderer& renderer, MappedInputManager& mappedInput,
|
||
|
|
const std::string& originalWord, const std::vector<std::string>& suggestions,
|
||
|
|
int readerFontId, uint8_t orientation, const std::string& cachePath)
|
||
|
|
: Activity("DictionarySuggestions", renderer, mappedInput),
|
||
|
|
originalWord(originalWord),
|
||
|
|
suggestions(suggestions),
|
||
|
|
readerFontId(readerFontId),
|
||
|
|
orientation(orientation),
|
||
|
|
cachePath(cachePath) {}
|
||
|
|
|
||
|
|
void onEnter() override;
|
||
|
|
void onExit() override;
|
||
|
|
void loop() override;
|
||
|
|
void render(RenderLock&&) override;
|
||
|
|
|
||
|
|
private:
|
||
|
|
std::string originalWord;
|
||
|
|
std::vector<std::string> suggestions;
|
||
|
|
int readerFontId;
|
||
|
|
uint8_t orientation;
|
||
|
|
std::string cachePath;
|
||
|
|
|
||
|
|
int selectedIndex = 0;
|
||
|
|
ButtonNavigator buttonNavigator;
|
||
|
|
};
|