Select enhancement (#3423)

Co-authored-by: Maurice Makaay <mmakaay1@xs4all.net>
This commit is contained in:
Maurice Makaay
2022-05-10 06:41:16 +02:00
committed by GitHub
parent 3a3d97dfa7
commit 44b68f140e
20 changed files with 461 additions and 78 deletions
+4 -2
View File
@@ -61,8 +61,10 @@ void Controller::setup_controller(bool include_internal) {
#endif
#ifdef USE_SELECT
for (auto *obj : App.get_selects()) {
if (include_internal || !obj->is_internal())
obj->add_on_state_callback([this, obj](const std::string &state) { this->on_select_update(obj, state); });
if (include_internal || !obj->is_internal()) {
obj->add_on_state_callback(
[this, obj](const std::string &state, size_t index) { this->on_select_update(obj, state, index); });
}
}
#endif
#ifdef USE_LOCK