mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-12-06 04:02:16 +00:00
Merge remote-tracking branch 'upstream/master'
Conflicts: firmware/Makefile firmware/application/Makefile firmware/application/event_m0.cpp firmware/application/ui_setup.cpp firmware/application/ui_setup.hpp firmware/baseband/baseband_thread.cpp firmware/baseband/baseband_thread.hpp firmware/bootstrap/CMakeLists.txt firmware/common/message.hpp firmware/common/portapack_shared_memory.hpp hardware/.gitignore
This commit is contained in:
@@ -112,10 +112,13 @@ public:
|
||||
|
||||
void pop();
|
||||
|
||||
void display_modal(const std::string& title, const std::string& message);
|
||||
|
||||
void focus() override;
|
||||
|
||||
private:
|
||||
std::vector<std::unique_ptr<View>> view_stack;
|
||||
Widget* modal_view { nullptr };
|
||||
|
||||
Widget* view() const;
|
||||
|
||||
@@ -256,6 +259,29 @@ private:
|
||||
};
|
||||
};
|
||||
|
||||
class ModalMessageView : public View {
|
||||
public:
|
||||
ModalMessageView(
|
||||
NavigationView& nav,
|
||||
const std::string& title,
|
||||
const std::string& message
|
||||
);
|
||||
|
||||
void focus() override;
|
||||
|
||||
std::string title() const override { return title_; };
|
||||
|
||||
private:
|
||||
const std::string title_;
|
||||
|
||||
Text text_message { };
|
||||
|
||||
Button button_done {
|
||||
{ 10 * 8, 13 * 16, 10 * 8, 24 },
|
||||
"OK",
|
||||
};
|
||||
};
|
||||
|
||||
} /* namespace ui */
|
||||
|
||||
#endif/*__UI_NAVIGATION_H__*/
|
||||
|
||||
Reference in New Issue
Block a user