mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-30 18:15:39 +00:00
23 lines
637 B
C
23 lines
637 B
C
|
#pragma once
|
||
|
|
||
|
#include "../GuiComponent.h"
|
||
|
#include "TextComponent.h"
|
||
|
#include <functional>
|
||
|
|
||
|
//A simple "yes or no" popup box with callbacks for yes or no.
|
||
|
//Make sure you remember to push it onto the window!
|
||
|
class GuiMsgBoxYesNo : public GuiComponent
|
||
|
{
|
||
|
public:
|
||
|
GuiMsgBoxYesNo(Window* window, const std::string& msg, std::function<void()> yesCallback = nullptr, std::function<void()> noCallback = nullptr);
|
||
|
|
||
|
bool input(InputConfig* config, Input input) override;
|
||
|
void render(const Eigen::Affine3f& parentTrans) override;
|
||
|
|
||
|
private:
|
||
|
std::function<void()> mYesCallback, mNoCallback;
|
||
|
|
||
|
TextComponent mText;
|
||
|
TextComponent mInputText;
|
||
|
};
|