mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-07-01 18:16:53 -04:00
Rename display_error() -> display_modal(), add title argument.
This commit is contained in:
parent
6a3cd4c144
commit
ac49726707
4 changed files with 23 additions and 7 deletions
|
@ -102,7 +102,7 @@ public:
|
|||
|
||||
void pop();
|
||||
|
||||
void display_error(const std::string& message);
|
||||
void display_modal(const std::string& title, const std::string& message);
|
||||
|
||||
void focus() override;
|
||||
|
||||
|
@ -210,11 +210,19 @@ private:
|
|||
|
||||
class ModalMessageView : public View {
|
||||
public:
|
||||
ModalMessageView(NavigationView& nav, std::string message);
|
||||
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 {
|
||||
{ 0 * 8, 7 * 16, 30 * 8, 16 },
|
||||
""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue