Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [SOLVED] [BUG] getPointer* functions return nothing when a pointer is held on the virtual button even if this button is hidden

Author
Message
Scary Little Rabbit
14
Years of Service
User Offline
Joined: 4th Aug 2009
Location: Chelyabinsk, Russian Federation.
Posted: 21st Sep 2019 20:01 Edited at: 21st Sep 2019 20:04
default behaviour seems strange for me

Quote: "If a virtual button is on screen and is clicked or touched the button will capture that event and GetMouseLeftState will return 0 (up), and a touch event will not be generated for that action."


but it is becoming just ridiculous when the button is hidden.

error #1:
'too many stars, too many stares. disembody.'
Blast Born: Cars N' Guns

The author of this post has marked a post as an answer.

Go to answer

Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 21st Sep 2019 21:21 Edited at: 21st Sep 2019 21:23
This post has been marked by the post author as the answer.
Quote: "
but it is becoming just ridiculous when the button is hidden.
"

Did you also make the button inactive???

setVirtualButtonVisible(1, 0)

SetVirtualButtonActive( 1, 0)

That will make it read the pointer's world values whether the virtual button is hidden or not.

Coding things my way since 1981 -- Currently using AppGameKit V2 Tier 1
Scary Little Rabbit
14
Years of Service
User Offline
Joined: 4th Aug 2009
Location: Chelyabinsk, Russian Federation.
Posted: 21st Sep 2019 23:44
Conjured Entertainment wrote: "Did you also make the button inactive???"

oops, missed that. thank you
error #1:
'too many stars, too many stares. disembody.'
Blast Born: Cars N' Guns

Login to post a reply

Server time is: 2024-04-25 15:47:10
Your offset time is: 2024-04-25 15:47:10