SettingChimes: private Option struct, use std::array for cbOption
This commit is contained in:
parent
d55ec42b17
commit
ecb3cd3e31
|
@ -13,24 +13,23 @@ namespace Pinetime {
|
||||||
|
|
||||||
class SettingChimes : public Screen {
|
class SettingChimes : public Screen {
|
||||||
public:
|
public:
|
||||||
struct Option {
|
|
||||||
Controllers::Settings::ChimesOption chimesOption;
|
|
||||||
const char* name;
|
|
||||||
};
|
|
||||||
|
|
||||||
SettingChimes(DisplayApp* app, Pinetime::Controllers::Settings& settingsController);
|
SettingChimes(DisplayApp* app, Pinetime::Controllers::Settings& settingsController);
|
||||||
~SettingChimes() override;
|
~SettingChimes() override;
|
||||||
|
|
||||||
void UpdateSelected(lv_obj_t* object, lv_event_t event);
|
void UpdateSelected(lv_obj_t* object, lv_event_t event);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
struct Option {
|
||||||
|
Controllers::Settings::ChimesOption chimesOption;
|
||||||
|
const char* name;
|
||||||
|
};
|
||||||
static constexpr std::array<Option, 3> options = {{
|
static constexpr std::array<Option, 3> options = {{
|
||||||
{Controllers::Settings::ChimesOption::None, " Off"},
|
{Controllers::Settings::ChimesOption::None, " Off"},
|
||||||
{Controllers::Settings::ChimesOption::Hours, " Every hour"},
|
{Controllers::Settings::ChimesOption::Hours, " Every hour"},
|
||||||
{Controllers::Settings::ChimesOption::HalfHours, " Every 30 mins"}
|
{Controllers::Settings::ChimesOption::HalfHours, " Every 30 mins"}
|
||||||
}};
|
}};
|
||||||
|
|
||||||
lv_obj_t* cbOption[options.size()];
|
std::array<lv_obj_t*, options.size()> cbOption;
|
||||||
|
|
||||||
Controllers::Settings& settingsController;
|
Controllers::Settings& settingsController;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user