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 {
|
||||
public:
|
||||
struct Option {
|
||||
Controllers::Settings::ChimesOption chimesOption;
|
||||
const char* name;
|
||||
};
|
||||
|
||||
SettingChimes(DisplayApp* app, Pinetime::Controllers::Settings& settingsController);
|
||||
~SettingChimes() override;
|
||||
|
||||
void UpdateSelected(lv_obj_t* object, lv_event_t event);
|
||||
|
||||
private:
|
||||
struct Option {
|
||||
Controllers::Settings::ChimesOption chimesOption;
|
||||
const char* name;
|
||||
};
|
||||
static constexpr std::array<Option, 3> options = {{
|
||||
{Controllers::Settings::ChimesOption::None, " Off"},
|
||||
{Controllers::Settings::ChimesOption::Hours, " Every hour"},
|
||||
{Controllers::Settings::ChimesOption::HalfHours, " Every 30 mins"}
|
||||
}};
|
||||
|
||||
lv_obj_t* cbOption[options.size()];
|
||||
std::array<lv_obj_t*, options.size()> cbOption;
|
||||
|
||||
Controllers::Settings& settingsController;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue