MCPcopy Create free account
hub / github.com/crosspoint-reader/crosspoint-reader / loop

Method loop

src/activities/settings/OpdsSettingsActivity.cpp:50–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48void OpdsSettingsActivity::onExit() { Activity::onExit(); }
49
50void OpdsSettingsActivity::loop() {
51 if (mappedInput.wasPressed(MappedInputManager::Button::Back)) {
52 finish();
53 return;
54 }
55
56 if (mappedInput.wasPressed(MappedInputManager::Button::Confirm)) {
57 handleSelection();
58 return;
59 }
60
61 const int menuItems = getMenuItemCount();
62 buttonNavigator.onNext([this, menuItems] {
63 selectedIndex = (selectedIndex + 1) % menuItems;
64 requestUpdate();
65 });
66
67 buttonNavigator.onPrevious([this, menuItems] {
68 selectedIndex = (selectedIndex + menuItems - 1) % menuItems;
69 requestUpdate();
70 });
71}
72
73bool OpdsSettingsActivity::saveServer() {
74 bool success = false;

Callers

nothing calls this directly

Calls 3

onNextMethod · 0.80
onPreviousMethod · 0.80
wasPressedMethod · 0.45

Tested by

no test coverage detected