bsnes/hiro/extension/message-dialog.hpp
Tim Allen 8d5cc0c35e Update to v099r15 release.
byuu says:

Changelog:
- nall::lstring -> nall::string_vector
- added IntegerBitField<type, lo, hi> -- hopefully it works correctly...
- Multitap 1-4 -> Super Multitap 2-5
- fixed SFC PPU CGRAM read regression
- huge amounts of SFC PPU IO register cleanups -- .bits really is lovely
- re-added the read/write(VRAM,OAM,CGRAM) helpers for the SFC PPU
  - but they're now optimized to the realities of the PPU (16-bit data
    sizes / no address parameter / where appropriate)
  - basically used to get the active-display overrides in a unified place;
    but also reduces duplicate code in (read,write)IO
2016-07-04 21:48:17 +10:00

28 lines
753 B
C++

#if defined(Hiro_MessageDialog)
struct MessageDialog {
using type = MessageDialog;
MessageDialog(const string& text = "");
auto error(const string_vector& buttons = {"Ok"}) -> string;
auto information(const string_vector& buttons = {"Ok"}) -> string;
auto question(const string_vector& buttons = {"Yes", "No"}) -> string;
auto setParent(sWindow parent = {}) -> type&;
auto setText(const string& text = "") -> type&;
auto setTitle(const string& title = "") -> type&;
auto warning(const string_vector& buttons = {"Ok"}) -> string;
private:
struct State {
string_vector buttons;
vector<uint8_t> icon;
sWindow parent;
string response;
string text;
string title;
} state;
auto _run() -> string;
};
#endif