Move nav back button outside of ReceiverView.

This commit is contained in:
Jared Boone 2016-01-25 11:13:19 -08:00
parent 029a44e24c
commit 15800eea33
4 changed files with 40 additions and 12 deletions

View file

@ -39,11 +39,20 @@ namespace ui {
class SystemStatusView : public View {
public:
std::function<void(void)> on_back;
SystemStatusView();
void set_back_visible(bool new_value);
private:
Button button_back {
{ 0 * 8, 0 * 16, 3 * 8, 16 },
" < ",
};
Text portapack {
{ 0, 0, 9 * 8, 1 * 16 },
{ 3 * 8, 0, 9 * 8, 1 * 16 },
"PortaPack",
};
@ -52,11 +61,15 @@ private:
class NavigationView : public View {
public:
std::function<void(void)> on_view_changed;
NavigationView() { }
NavigationView(const NavigationView&) = delete;
NavigationView(NavigationView&&) = delete;
bool is_top() const;
template<class T, class... Args>
T* push(Args&&... args) {
return reinterpret_cast<T*>(push_view(std::unique_ptr<View>(new T(*this, std::forward<Args>(args)...))));