|
|
|
|
|
|
|
|
|
|
|
#pragma once |
|
|
#include "imrad.h" |
|
|
|
|
|
class ErrorBox |
|
|
{ |
|
|
public: |
|
|
|
|
|
void OpenPopup(std::function<void(ImRad::ModalResult)> clb = [](ImRad::ModalResult){}); |
|
|
void ClosePopup(ImRad::ModalResult mr = ImRad::Cancel); |
|
|
void Draw(); |
|
|
|
|
|
std::string title = "title"; |
|
|
std::string message = "message"; |
|
|
std::string error; |
|
|
|
|
|
|
|
|
private: |
|
|
|
|
|
void ResetLayout(); |
|
|
void Init(); |
|
|
|
|
|
void CustomWidget_Draw(const ImRad::CustomWidgetArgs& args); |
|
|
|
|
|
ImGuiID ID = 0; |
|
|
ImRad::ModalResult modalResult; |
|
|
std::function<void(ImRad::ModalResult)> callback; |
|
|
ImRad::VBox vb1; |
|
|
ImRad::HBox hb3; |
|
|
|
|
|
}; |
|
|
|
|
|
extern ErrorBox errorBox; |
|
|
|