mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
Added love.window.showMessageBox.
It has two variants: showMessageBox(type, title, message [, attachtowindow=true]), and showMessageBox(type, title, message, buttons [, attachtowindow=true]). The former shows a simple message box with a single OK button, and the latter displays several buttons. The buttons argument is an array of button names. The second variant returns the index of the pressed button, or 0 if the message box was closed some other way. showMessageBox will block until the message box is closed (and it can't be called on a separate thread.)
This commit is contained in:
@@ -87,6 +87,9 @@ public:
|
||||
|
||||
const void *getHandle() const;
|
||||
|
||||
bool showMessageBox(MessageBoxType type, const std::string &title, const std::string &message, bool attachtowindow);
|
||||
int showMessageBox(const MessageBoxData &data);
|
||||
|
||||
static love::window::Window *createSingleton();
|
||||
static love::window::Window *getSingleton();
|
||||
|
||||
@@ -100,6 +103,8 @@ private:
|
||||
// Update the saved window settings based on the window's actual state.
|
||||
void updateSettings(const WindowSettings &newsettings);
|
||||
|
||||
SDL_MessageBoxFlags convertMessageBoxType(MessageBoxType type) const;
|
||||
|
||||
std::string windowTitle;
|
||||
|
||||
struct _currentMode
|
||||
|
||||
Reference in New Issue
Block a user