mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-10-17 09:02:25 +00:00
Savestate ! RDS (only PSN) tx
This commit is contained in:
@@ -20,9 +20,13 @@
|
||||
*/
|
||||
|
||||
#include "ui_setup.hpp"
|
||||
#include "touch.hpp"
|
||||
|
||||
#include "portapack_persistent_memory.hpp"
|
||||
#include "lpc43xx_cpp.hpp"
|
||||
|
||||
#include <math.h>
|
||||
|
||||
using namespace lpc43xx;
|
||||
|
||||
namespace ui {
|
||||
@@ -157,11 +161,34 @@ void AboutView::focus() {
|
||||
button_ok.focus();
|
||||
}
|
||||
|
||||
SetTouchCalibView::SetTouchCalibView(NavigationView& nav) {
|
||||
add_children({{
|
||||
&text_title,
|
||||
&text_debugx,
|
||||
&text_debugy,
|
||||
&button_ok
|
||||
}});
|
||||
|
||||
button_ok.on_select = [&nav](Button&){ nav.pop(); };
|
||||
}
|
||||
|
||||
void SetTouchCalibView::focus() {
|
||||
button_ok.focus();
|
||||
}
|
||||
|
||||
bool SetTouchCalibView::on_touch(const TouchEvent event) {
|
||||
if (event.type == ui::TouchEvent::Type::Start) {
|
||||
text_debugx.set(to_string_dec_uint(round(event.rawpoint.x), 4));
|
||||
text_debugy.set(to_string_dec_uint(round(event.rawpoint.y), 4));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
SetupMenuView::SetupMenuView(NavigationView& nav) {
|
||||
add_items<3>({ {
|
||||
{ "Date/Time", [&nav](){ nav.push(new SetDateTimeView { nav }); } },
|
||||
{ "Frequency Correction", [&nav](){ nav.push(new SetFrequencyCorrectionView { nav }); } },
|
||||
{ "Touch", [&nav](){ nav.push(new NotImplementedView { nav }); } },
|
||||
{ "Touch", [&nav](){ nav.push(new SetTouchCalibView { nav }); } },
|
||||
} });
|
||||
on_left = [&nav](){ nav.pop(); };
|
||||
}
|
||||
|
Reference in New Issue
Block a user