CheckBoxList : rename newValue -> value.
This commit is contained in:
parent
cf8b422899
commit
4ec49bde8a
2 changed files with 4 additions and 5 deletions
|
@ -22,8 +22,7 @@ CheckboxList::CheckboxList(const uint8_t screenID,
|
||||||
: Screen(app),
|
: Screen(app),
|
||||||
screenID {screenID},
|
screenID {screenID},
|
||||||
OnValueChanged{std::move(OnValueChanged)},
|
OnValueChanged{std::move(OnValueChanged)},
|
||||||
options {options},
|
options {options}, value {originalValue} {
|
||||||
newValue{originalValue} {
|
|
||||||
// Set the background to Black
|
// Set the background to Black
|
||||||
lv_obj_set_style_local_bg_color(lv_scr_act(), LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_BLACK);
|
lv_obj_set_style_local_bg_color(lv_scr_act(), LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_BLACK);
|
||||||
|
|
||||||
|
@ -92,7 +91,7 @@ CheckboxList::CheckboxList(const uint8_t screenID,
|
||||||
|
|
||||||
CheckboxList::~CheckboxList() {
|
CheckboxList::~CheckboxList() {
|
||||||
lv_obj_clean(lv_scr_act());
|
lv_obj_clean(lv_scr_act());
|
||||||
OnValueChanged(newValue);
|
OnValueChanged(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CheckboxList::UpdateSelected(lv_obj_t* object, lv_event_t event) {
|
void CheckboxList::UpdateSelected(lv_obj_t* object, lv_event_t event) {
|
||||||
|
@ -101,7 +100,7 @@ void CheckboxList::UpdateSelected(lv_obj_t* object, lv_event_t event) {
|
||||||
if (strcmp(options[i], "")) {
|
if (strcmp(options[i], "")) {
|
||||||
if (object == cbOption[i]) {
|
if (object == cbOption[i]) {
|
||||||
lv_checkbox_set_checked(cbOption[i], true);
|
lv_checkbox_set_checked(cbOption[i], true);
|
||||||
newValue = MaxItems * screenID + i;
|
value = MaxItems * screenID + i;
|
||||||
} else {
|
} else {
|
||||||
lv_checkbox_set_checked(cbOption[i], false);
|
lv_checkbox_set_checked(cbOption[i], false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ namespace Pinetime {
|
||||||
std::array<lv_point_t, 2> pageIndicatorPoints;
|
std::array<lv_point_t, 2> pageIndicatorPoints;
|
||||||
lv_obj_t* pageIndicatorBase;
|
lv_obj_t* pageIndicatorBase;
|
||||||
lv_obj_t* pageIndicator;
|
lv_obj_t* pageIndicator;
|
||||||
uint32_t newValue;
|
uint32_t value;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue