Comments (13)
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.
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.
Could you please zip the project and share it here (exclude .git and build folder)?
from gooey.
Sure, sorry:
testapp.zip
I must be doing something wrong here? Just no idea what it would be
from gooey.
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.
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.
Very strange. Which OS are you using? Is it a standard mouse you're using?
from gooey.
Windows 10 Pro 64bit
Editor version 1.2.141
Was using bluetooth mouse, same result with trackpad and touchscreen
from gooey.
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.
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.
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.
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.
Not a bug. Closing.
from gooey.
Related Issues (20)
- Trying to erase none utf8 characters throw errors HOT 4
- Scroll list flick
- Bug: If dynamic list becomes empty, items have invalid data attached HOT 3
- Using character . after numbers will introduces extra characters on mobile HOT 6
- Missing return checkbox instance in set_checked or set_visible HOT 1
- Scrolling wheel speed option
- How can I change the theme ? HOT 2
- No typing input from Android browsers HOT 2
- Missed backspaces on iOS
- Grid component
- .nodes failing on list items in dynamic_list HOT 3
- Input widget's "deselected_now" property always false
- List data HOT 1
- Lists are not updated on list refresh since 10.0.0 HOT 2
- Fix for trailing spaces creates issues
- Dynamic List Refresh Behavior HOT 3
- Example project missing sprites and runtime errors HOT 4
- Radio parameter description missing
- Feature request: UI navigation HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gooey.