Add double and long clicks in lists
This commit is contained in:
@@ -43,15 +43,8 @@ void NetworkModeSelectionActivity::loop() {
|
||||
}
|
||||
|
||||
// Handle navigation
|
||||
buttonNavigator.onNext([this] {
|
||||
selectedIndex = ButtonNavigator::nextIndex(selectedIndex, MENU_ITEM_COUNT);
|
||||
requestUpdate();
|
||||
});
|
||||
|
||||
buttonNavigator.onPrevious([this] {
|
||||
selectedIndex = ButtonNavigator::previousIndex(selectedIndex, MENU_ITEM_COUNT);
|
||||
requestUpdate();
|
||||
});
|
||||
buttonNavigator.onNextList(selectedIndex, MENU_ITEM_COUNT, [this] { requestUpdate(); });
|
||||
buttonNavigator.onPreviousList(selectedIndex, MENU_ITEM_COUNT, [this] { requestUpdate(); });
|
||||
}
|
||||
|
||||
void NetworkModeSelectionActivity::render(RenderLock&&) {
|
||||
|
||||
@@ -636,15 +636,9 @@ void WifiSelectionActivity::loop() {
|
||||
}
|
||||
|
||||
// Handle navigation
|
||||
buttonNavigator.onNext([this] {
|
||||
selectedNetworkIndex = ButtonNavigator::nextIndex(selectedNetworkIndex, networks.size());
|
||||
requestUpdate();
|
||||
});
|
||||
|
||||
buttonNavigator.onPrevious([this] {
|
||||
selectedNetworkIndex = ButtonNavigator::previousIndex(selectedNetworkIndex, networks.size());
|
||||
requestUpdate();
|
||||
});
|
||||
buttonNavigator.onNextList(selectedNetworkIndex, static_cast<int>(networks.size()), [this] { requestUpdate(); });
|
||||
buttonNavigator.onPreviousList(selectedNetworkIndex, static_cast<int>(networks.size()),
|
||||
[this] { requestUpdate(); });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ class WifiSelectionActivity final : public Activity {
|
||||
ButtonNavigator buttonNavigator;
|
||||
|
||||
WifiSelectionState state = WifiSelectionState::SCANNING;
|
||||
size_t selectedNetworkIndex = 0;
|
||||
int selectedNetworkIndex = 0;
|
||||
std::vector<WifiNetworkInfo> networks;
|
||||
|
||||
// Selected network for connection
|
||||
|
||||
Reference in New Issue
Block a user