| 1 | --[[ |
| 2 | Copyright (C) 2014 HarpyWar ([email protected]) |
| 3 | |
| 4 | This file is a part of the PvPGN Project http://pvpgn.pro |
| 5 | Licensed under the same terms as Lua itself. |
| 6 | ]]-- |
| 7 | |
| 8 | |
| 9 | -- https://github.com/pvpgn/pvpgn-server/issues/15 |
| 10 | -- http://msdn.microsoft.com/en-us/library/windows/desktop/ms645505(v=vs.85).aspx |
| 11 | -- |
| 12 | -- use math_or(mb_type1, mb_type2) to combine two messagebox types |
| 13 | --[[ Example code to display Windows MessageBox: |
| 14 | local mb_type = math_or(MB_DEFBUTTON2, math_or(MB_ABORTRETRYIGNORE, MB_ICONEXCLAMATION) ) |
| 15 | api.messagebox_show(account.name, "aaaaaaaaaaaaaaaaaaaaaaaaawwadwwadawdawdawdwadawdaaw", "MessageBox from " .. config.servername, mb_type) |
| 16 | ]]-- |
| 17 | |
| 18 | MB_ABORTRETRYIGNORE, |
| 19 | MB_CANCELTRYCONTINUE, |
| 20 | MB_HELP, |
| 21 | MB_OK, |
| 22 | MB_OKCANCEL, |
| 23 | MB_RETRYCANCEL, |
| 24 | MB_YESNO, |
| 25 | MB_YESNOCANCEL, |
| 26 | |
| 27 | MB_ICONEXCLAMATION, |
| 28 | MB_ICONWARNING, |
| 29 | MB_ICONINFORMATION, |
| 30 | MB_ICONASTERISK, |
| 31 | MB_ICONQUESTION, |
| 32 | MB_ICONSTOP, |
| 33 | MB_ICONERROR, |
| 34 | MB_ICONHAND, |
| 35 | |
| 36 | MB_DEFBUTTON1, |
| 37 | MB_DEFBUTTON2, |
| 38 | MB_DEFBUTTON3, |
| 39 | MB_DEFBUTTON4, |
| 40 | |
| 41 | MB_APPLMODAL, |
| 42 | MB_SYSTEMMODAL, |
| 43 | MB_TASKMODAL, |
| 44 | |
| 45 | MB_DEFAULT_DESKTOP_ONLY, |
| 46 | MB_RIGHT, |
| 47 | MB_RTLREADING, |
| 48 | MB_SETFOREGROUND, |
| 49 | MB_TOPMOST, |
| 50 | MB_SERVICE_NOTIFICATION |
| 51 | = 0x00000002,0x00000006,0x00004000,0x00000000,0x00000001,0x00000005,0x00000004,0x00000003,0x00000030,0x00000030,0x00000040,0x00000040,0x00000020,0x00000010,0x00000010,0x00000010,0x00000000,0x00000100,0x00000200,0x00000300,0x00000000,0x00001000,0x00002000,0x00020000,0x00080000,0x00100000,0x00010000,0x00040000,0x00200000 |