mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-14 09:25:30 -04:00
Move nav back button outside of ReceiverView.
This commit is contained in:
parent
029a44e24c
commit
15800eea33
4 changed files with 40 additions and 12 deletions
|
@ -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)...))));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue