OMOTE/Platformio/OmoteUI/UIs/BasicRefactored/BasicUI.cpp
MatthewColvin 99787a69f2 added initial wifi settings page
currently can  scan for networks and
show them but clicking does nothing.
2023-10-15 00:24:07 -05:00

20 lines
No EOL
558 B
C++

#include "BasicUI.hpp"
#include "HomeScreen.hpp"
#include "ScreenManager.hpp"
using namespace UI;
BasicUI::BasicUI(std::shared_ptr<HardwareAbstract> aHardware)
: UIBase(aHardware) {
aHardware->keys()->RegisterKeyPressHandler([](auto aKeyEvent) {
return Screen::Manager::getInstance().distributeKeyEvent(aKeyEvent);
// Could potentially add a check here and display that a key event was
// unused.
});
Screen::Manager::getInstance().pushScreen(
std::make_unique<Screen::HomeScreen>(aHardware));
mHardware->wifi()->begin();
}