| 79 | } |
| 80 | |
| 81 | void DifficultyPanel::_onCheckBoxToggle(wxCommandEvent& ev) |
| 82 | { |
| 83 | // Update the sensitivity of the other toggles |
| 84 | |
| 85 | if (ev.GetEventObject() == _allLevels) |
| 86 | { |
| 87 | // The "All levels" toggle has been changed, set the 1..N checkboxes |
| 88 | // to the inverse of the togglebutton's status |
| 89 | for (std::size_t i = 0; i < _toggles.size(); i++) |
| 90 | { |
| 91 | _toggles[i]->Enable(!_allLevels->GetValue()); |
| 92 | } |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | void DifficultyPanel::writeToObjective(Objective& obj) |
| 97 | { |