1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

gg: add event handling for mouse down/up and mouse leave/out on VJS (#12917)

This commit is contained in:
playX
2021-12-21 13:31:29 +03:00
committed by GitHub
parent cc2fcb52d6
commit ade14491d4
3 changed files with 141 additions and 19 deletions

View File

@ -92,8 +92,10 @@ pub fn isnil(val voidptr) bool {
res := false
// This one is kinda weird. In C and native backend we can cast booleans and integers to pointers
// so we just check *for* all possible NULL-like values here.
#val = val.valueOf()
#res.val = val === null || val === undefined || val === false || val === 0 || val === BigInt(0)
#if (typeof val == 'function') { res.val = false; } else {
#val = val instanceof voidptr ? val.valueOf().val : val;
#res.val = val === null || val === undefined || val === false || val === 0 || val === BigInt(0) || (val instanceof int ? val.val == 0 : false)
#}
return res
}