Giter VIP home page Giter VIP logo

Comments (13)

britzl avatar britzl commented on May 29, 2024

Hmm, this could be a problem on mobile. When I tested on desktop using one of the examples (kenneyblue.gui_script) i got clicked=true and released_now=true in the same frame. Can you verify if you get the same behavior when you test on desktop?

from gooey.

base-thomas avatar base-thomas commented on May 29, 2024

Still getting the same behavior with desktop/mouse, despite making a new blank project to test with. I uploaded it to the cloud if you'd like to take a look: project id #153589

from gooey.

britzl avatar britzl commented on May 29, 2024

Could you please zip the project and share it here (exclude .git and build folder)?

from gooey.

base-thomas avatar base-thomas commented on May 29, 2024

Sure, sorry:
testapp.zip

I must be doing something wrong here? Just no idea what it would be

from gooey.

britzl avatar britzl commented on May 29, 2024

I added this:

print(input.clicked, input.released_now)

To the top of your update_input(input) function. When the mouse button is released I see:

DEBUG:SCRIPT: true	true
DEBUG:SCRIPT: released!

Isn't that what you expected to see?

from gooey.

base-thomas avatar base-thomas commented on May 29, 2024

Odd, this is not the behavior I'm continuing to experience. Doing what you did (on desktop) gives me the following in console:

INFO:DLIB: SSDP: Started on address __________
DEBUG:SCRIPT: false false
DEBUG:SCRIPT: Touch!
DEBUG:SCRIPT: false false
DEBUG:SCRIPT: nil nil

So the question is.... what could be different on my end? Weirdly enough I did experience the correct functionality for one of my earlier builds yesterday but was not able to replicate it a second time. As far as I can remember I didn't change anything notable before/after it was working though...

from gooey.

britzl avatar britzl commented on May 29, 2024

Very strange. Which OS are you using? Is it a standard mouse you're using?

from gooey.

base-thomas avatar base-thomas commented on May 29, 2024

Windows 10 Pro 64bit
Editor version 1.2.141
Was using bluetooth mouse, same result with trackpad and touchscreen

from gooey.

britzl avatar britzl commented on May 29, 2024

1.2.141? That is a very very old version of Defold. We are releasing 1.2.161 tomorrow. Why are you using such an old version?

from gooey.

base-thomas avatar base-thomas commented on May 29, 2024

It was the one I downloaded a few months ago when I started using defold. I installed and tested 1.2.160 and am still getting the same functionality across all my projects though.

from gooey.

base-thomas avatar base-thomas commented on May 29, 2024

Ok wait, I think I figured it out!

The nil nil case only occurs when the touch happens outside the bounds of the text node, I had assumed that the state machine would still track press/release status regardless of where that touch was on the screen, but it does not.
Is this the intended functionality? I feel like it would be more robust to update these fields regardless, for example if the input box background is larger than the text node, the user might touch what looks like the node but won't trigger the relevant input function.

I went back into my projects and tested further, more specifically the nil case only occurs if there has not been a completed touch originating in the input node. Once that happens touches outside the node show 'released_now' and 'clicked' as false instead of nil

Thanks for your attention and help with my issue, as well as for making this library! Now that I understand what is going wrong I can move forward on my project once again.

from gooey.

britzl avatar britzl commented on May 29, 2024

If the mouse down event happens inside the node but the released event happens outside then I would expect clicked to be false and released_now would be true.

from gooey.

britzl avatar britzl commented on May 29, 2024

Not a bug. Closing.

from gooey.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.