mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-02 23:23:55 +00:00
Update window
This commit is contained in:
parent
c2719e6c09
commit
ed35209c11
2
doc.md
2
doc.md
@ -388,4 +388,4 @@ func main() {
|
|||||||
|
|
||||||
####Return:
|
####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.
|
||||||
|
@ -390,7 +390,7 @@ ____ __ ____ __ .__ __. _______ ______ ____ __ ____
|
|||||||
\__/ \__/ |__| |__| \__| |_______/ \______/ \__/ \__/
|
\__/ \__/ |__| |__| \__| |_______/ \______/ \__/ \__/
|
||||||
|
|
||||||
*/
|
*/
|
||||||
func ShowAlert(title, msg string, args ...string) {
|
func ShowAlert(title, msg string, args ...string) int {
|
||||||
var (
|
var (
|
||||||
// title string
|
// title string
|
||||||
// msg string
|
// msg string
|
||||||
@ -411,5 +411,7 @@ func ShowAlert(title, msg string, args ...string) {
|
|||||||
amsg := C.CString(msg)
|
amsg := C.CString(msg)
|
||||||
adefaultButton := C.CString(defaultButton)
|
adefaultButton := C.CString(defaultButton)
|
||||||
acancelButton := C.CString(cancelButton)
|
acancelButton := C.CString(cancelButton)
|
||||||
C.aShowAlert(atitle, amsg, adefaultButton, acancelButton)
|
cbool := C.aShowAlert(atitle, amsg, adefaultButton, acancelButton)
|
||||||
|
ibool := int(cbool)
|
||||||
|
return ibool
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
int aShowAlert(const char *title, const char *msg, const char *defaultButton,
|
int aShowAlert(const char *title, const char *msg, const char *defaultButton,
|
||||||
const char *cancelButton){
|
const char *cancelButton){
|
||||||
showAlert(title,msg,defaultButton,cancelButton);
|
int alert=showAlert(title,msg,defaultButton,cancelButton);
|
||||||
|
|
||||||
return 0;
|
return alert;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user