## Summary Added theme support to the language screen  ## Additional Context --- ### AI Usage Did you use AI tools to help write this code? _**NO**_
36 lines
844 B
C++
36 lines
844 B
C++
#pragma once
|
|
|
|
#include <GfxRenderer.h>
|
|
#include <I18n.h>
|
|
|
|
#include <functional>
|
|
|
|
#include "../ActivityWithSubactivity.h"
|
|
#include "components/UITheme.h"
|
|
#include "util/ButtonNavigator.h"
|
|
|
|
class MappedInputManager;
|
|
|
|
/**
|
|
* Activity for selecting UI language
|
|
*/
|
|
class LanguageSelectActivity final : public Activity {
|
|
public:
|
|
explicit LanguageSelectActivity(GfxRenderer& renderer, MappedInputManager& mappedInput,
|
|
const std::function<void()>& onBack)
|
|
: Activity("LanguageSelect", renderer, mappedInput), onBack(onBack) {}
|
|
|
|
void onEnter() override;
|
|
void onExit() override;
|
|
void loop() override;
|
|
void render(Activity::RenderLock&&) override;
|
|
|
|
private:
|
|
void handleSelection();
|
|
|
|
std::function<void()> onBack;
|
|
ButtonNavigator buttonNavigator;
|
|
int selectedIndex = 0;
|
|
int totalItems = 0;
|
|
};
|