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() does not return a 1 if you click on an EditBox?

Author
Message
Rudders
12
Years of Service
User Offline
Joined: 20th Jan 2012
Location: Oxfordshire UK
Posted: 1st Mar 2013 11:04
Hi Sorry trouble with EditBoxes again, I know there has been a lot of work on EditBox commands for the next release but I just wanted to check that the GetPointerPressed() should return a 1 if user clicks over an EditBox? It does not currently!

I can obvioulsy use GetCurrentEditBox() to find the EditBox in use but that is not my issue it is detecting every GetPointerPressed I need.

Is a fault or not?

Cheers
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 1st Mar 2013 13:17
If you click on an editbox/virtual button/virtual joystick then getPointer commands will not return anything because you are not clicking on the "world" you are clicking on a GUI object. This is expected behaviour although it might not suit your needs. Why do you need to find out if the user is clicking/pressing? Perhaps you can just keep track of "getEditboxHasFocus" for each of your editboxes and when this changes you know the user has clicked on or finished with an editbox?


this.mess = abs(sin(times#))
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 2nd Mar 2013 10:11 Edited at: 2nd Mar 2013 10:15
i agree with Rudders

it have no reason, a sprite over my textbox is in the "world"
for the gui a GetMouseOverGUI()=1 whould be fine.
(i wrote a new feature request)
Rudders
12
Years of Service
User Offline
Joined: 20th Jan 2012
Location: Oxfordshire UK
Posted: 6th Mar 2013 11:56
Thanks for the input and clarifying the Pointer Pressed return.

I am writing a new sprite placement editor and it would have been simpler to always detect when a user has 'clicked' the mouse and then check whether it was a sprite, control or edit box but I will code accordingly, thanks.
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 7th Apr 2013 18:51 Edited at: 7th Apr 2013 18:52
Damn !!! VirtualButtons Catch the GetPointerPressed/Released etc etc even if it is invisible !!!!!

2 hours lost for that ... damned
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 7th Apr 2013 19:01
Its not a Bug its a Feature
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 7th Apr 2013 19:39
This is why I have changed (am changing) all uses of Virtual buttons to regular sprites and using GetSpriteHitTest (only when button is actually visible).

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 8th Apr 2013 02:34 Edited at: 8th Apr 2013 02:34
that's what i'm doing too right now...

Now for me virtual buttons are prohibited ^^

Login to post a reply

Server time is: 2024-05-01 12:46:33
Your offset time is: 2024-05-01 12:46:33