22 lines
474 B
C++
22 lines
474 B
C++
#pragma once
|
|
|
|
#include "ui/widget.hpp"
|
|
#include <optional>
|
|
|
|
namespace sphaira::ui {
|
|
|
|
class ErrorBox final : public Widget {
|
|
public:
|
|
ErrorBox(Result code, const std::string& message);
|
|
ErrorBox(const std::string& message);
|
|
|
|
auto Update(Controller* controller, TouchInfo* touch) -> void override;
|
|
auto Draw(NVGcontext* vg, Theme* theme) -> void override;
|
|
|
|
private:
|
|
std::optional<Result> m_code{};
|
|
std::string m_message{};
|
|
};
|
|
|
|
} // namespace sphaira::ui
|