messagebox can be closed now
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@362 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
parent
07199650b7
commit
c531bf45a0
4 changed files with 13 additions and 0 deletions
|
|
@ -19,6 +19,12 @@ static void spawn_button(MwWidget handle, int x, int y, int id, const char* text
|
|||
handle->opaque = mb;
|
||||
}
|
||||
|
||||
static void messagebox_close(MwWidget handle, void* user, void* call) {
|
||||
(void)user;
|
||||
(void)call;
|
||||
MwMessageBoxDestroy(handle);
|
||||
}
|
||||
|
||||
MwWidget MwMessageBox(MwWidget handle, const char* text, const char* title, unsigned int flag) {
|
||||
MwWidget window;
|
||||
MwPoint p;
|
||||
|
|
@ -95,6 +101,8 @@ MwWidget MwMessageBox(MwWidget handle, const char* text, const char* title, unsi
|
|||
MwLLSetSizeHints(window->lowlevel, w, h, w, h);
|
||||
MwLLMakePopup(window->lowlevel, handle->lowlevel);
|
||||
|
||||
MwAddUserHandler(window, MwNcloseHandler, messagebox_close, NULL);
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue