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 / GetPointerPressed() and EditBox. Bug?

Author
Message
Jambo B
15
Years of Service
User Offline
Joined: 17th Sep 2009
Location: The Pit
Posted: 23rd Jul 2019 11:47
Hello all

The EditBox does not seem to take into account its depth. In the code below, a sprite is placed in front of an EditBox. Clicking the sprite causes 'HIT!' to be printed.

The problem is, if the pointer is over the EditBox at the time, then the EditBox gets focused even though it is behind the sprite. It then becomes impossible to read a HIT on the sprite.




Is there a work-around for this?

Thanks,

James
Golelorn
7
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 23rd Jul 2019 21:01
Here is what I did to get around that.



Jambo B
15
Years of Service
User Offline
Joined: 17th Sep 2009
Location: The Pit
Posted: 25th Jul 2019 10:00
Actually that's not bad, Golelorn, thanks. Only problem is, that as soon as the mouse is over the sprite (even if the mouse button is not pressed), the editbox becomes disabled and cannot be typed into. I tried changing your code to this:



But that doesn't work because GetPointerPressed() returns zero if an editbox is under the mouse pointer.
Jambo B
15
Years of Service
User Offline
Joined: 17th Sep 2009
Location: The Pit
Posted: 25th Jul 2019 10:21
In fact, the edit box 'locks out' all pointer commands:



This is most inconvenient!
Qugurun
Valued Member
9
Years of Service
User Offline
Joined: 8th Dec 2014
Playing: AppGameKit
Posted: 25th Jul 2019 20:55 Edited at: 25th Jul 2019 21:14
I tried to resolve this issue.

But it seems to be a little wrong work, but I hope this will help you somehow.



https://www.instagram.com/qugurun/

Attachments

Login to view attachments
Qugurun
Valued Member
9
Years of Service
User Offline
Joined: 8th Dec 2014
Playing: AppGameKit
Posted: 25th Jul 2019 23:14

https://www.instagram.com/qugurun/

Attachments

Login to view attachments
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 29th Jul 2019 12:31
Jambo B
15
Years of Service
User Offline
Joined: 17th Sep 2009
Location: The Pit
Posted: 29th Jul 2019 16:51 Edited at: 29th Jul 2019 16:52
Many thanks for the heads-up on that one, blink0k, and for your help, Qugurun. I'll have a mess about with it.

Login to post a reply

Server time is: 2024-10-01 08:34:09
Your offset time is: 2024-10-01 08:34:09