mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-12-24 23:09:26 -05:00
Add AISAppView.
This commit is contained in:
parent
fc16bc7867
commit
1f2b28b2b8
@ -292,4 +292,15 @@ void AISRecentEntriesView::advance(const int32_t amount) {
|
||||
set_dirty();
|
||||
}
|
||||
|
||||
AISAppView::AISAppView() {
|
||||
add_children({ {
|
||||
&recent_entries_view,
|
||||
} });
|
||||
}
|
||||
|
||||
void AISAppView::set_parent_rect(const Rect new_parent_rect) {
|
||||
View::set_parent_rect(new_parent_rect);
|
||||
recent_entries_view.set_parent_rect({ 0, 0, new_parent_rect.width(), new_parent_rect.height() });
|
||||
}
|
||||
|
||||
} /* namespace ui */
|
||||
|
@ -134,6 +134,16 @@ private:
|
||||
void advance(const int32_t amount);
|
||||
};
|
||||
|
||||
class AISAppView : public View {
|
||||
public:
|
||||
AISAppView();
|
||||
|
||||
void set_parent_rect(const Rect new_parent_rect) override;
|
||||
|
||||
private:
|
||||
AISRecentEntriesView recent_entries_view;
|
||||
};
|
||||
|
||||
} /* namespace ui */
|
||||
|
||||
#endif/*__AIS_APP_H__*/
|
||||
|
@ -517,7 +517,7 @@ void ReceiverView::on_modulation_changed(ReceiverModel::Mode mode) {
|
||||
break;
|
||||
|
||||
case ReceiverModel::Mode::AIS:
|
||||
widget_content = std::make_unique<AISRecentEntriesView>();
|
||||
widget_content = std::make_unique<AISAppView>();
|
||||
break;
|
||||
|
||||
case ReceiverModel::Mode::SpectrumAnalysis:
|
||||
|
Loading…
Reference in New Issue
Block a user