mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-05-06 08:45:01 -04:00
Split ADSB TX into tabs
Simplified TabView a lot
This commit is contained in:
parent
89a3afcd74
commit
a5f0f72ea1
8 changed files with 358 additions and 240 deletions
|
@ -96,8 +96,10 @@ void GeoMapView::move_map() {
|
|||
}
|
||||
|
||||
GeoMapView::GeoMapView(
|
||||
NavigationView& nav
|
||||
) : nav_ (nav)
|
||||
NavigationView& nav,
|
||||
Mode mode
|
||||
) : nav_ (nav),
|
||||
mode_ (mode)
|
||||
{
|
||||
auto result = map_file.open("ADSB/world_map.bin");
|
||||
if (result.is_valid()) {
|
||||
|
@ -113,19 +115,22 @@ GeoMapView::GeoMapView(
|
|||
|
||||
add_children({
|
||||
&field_xpos,
|
||||
&field_ypos,
|
||||
&field_angle
|
||||
&field_ypos
|
||||
});
|
||||
|
||||
if (mode_ == SHOW) {
|
||||
add_child(&field_angle);
|
||||
field_angle.on_change = [this](int32_t) {
|
||||
move_map();
|
||||
};
|
||||
}
|
||||
|
||||
field_xpos.on_change = [this](int32_t) {
|
||||
move_map();
|
||||
};
|
||||
field_ypos.on_change = [this](int32_t) {
|
||||
move_map();
|
||||
};
|
||||
field_angle.on_change = [this](int32_t) {
|
||||
move_map();
|
||||
};
|
||||
}
|
||||
|
||||
} /* namespace ui */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue