Update window

This commit is contained in:
vCaesar 2016-11-07 18:34:21 +08:00
parent c2719e6c09
commit ed35209c11
4 changed files with 8 additions and 6 deletions

2
doc.md
View File

@ -388,4 +388,4 @@ func main() {
####Return:
Returns True if the default button was pressed, or False if cancelled.
Returns 0(True) if the default button was pressed, or 1(False) if cancelled.

View File

@ -390,7 +390,7 @@ ____ __ ____ __ .__ __. _______ ______ ____ __ ____
\__/ \__/ |__| |__| \__| |_______/ \______/ \__/ \__/
*/
func ShowAlert(title, msg string, args ...string) {
func ShowAlert(title, msg string, args ...string) int {
var (
// title string
// msg string
@ -411,5 +411,7 @@ func ShowAlert(title, msg string, args ...string) {
amsg := C.CString(msg)
adefaultButton := C.CString(defaultButton)
acancelButton := C.CString(cancelButton)
C.aShowAlert(atitle, amsg, adefaultButton, acancelButton)
cbool := C.aShowAlert(atitle, amsg, adefaultButton, acancelButton)
ibool := int(cbool)
return ibool
}

View File

@ -3,7 +3,7 @@
int aShowAlert(const char *title, const char *msg, const char *defaultButton,
const char *cancelButton){
showAlert(title,msg,defaultButton,cancelButton);
int alert=showAlert(title,msg,defaultButton,cancelButton);
return 0;
return alert;
}

View File

@ -402,4 +402,4 @@ func main() {
####Return:
Returns True if the default button was pressed, or False if cancelled.
Returns 0(True) if the default button was pressed, or 1(False) if cancelled.