GithubHelp home page GithubHelp logo

NumberSelector about vis-ui HOT 8 CLOSED

LoekSangers avatar LoekSangers commented on July 17, 2024
NumberSelector

from vis-ui.

Comments (8)

kotcrab avatar kotcrab commented on July 17, 2024

Confirmed first input issue, will look into that.

When the timers fires it can only increment or decrement current value, it can't repeat number you pressed so I don't think that's it. This is timer task. There was bug in libGDX TextField that was causing repeating last entered char if field lost focus before getting touchUp event, it was fixed in VisUI 0.7.4. Maybe that was that?

NumberSelector supports setting min and max value, I could add method to add custom validators but is there really anything else you would like to validate?

from vis-ui.

LoekSangers avatar LoekSangers commented on July 17, 2024

The validation was to force the NumberSelector to not be empty, but I guess the min and max values also guarantee this.

It might be the libGDX TextField that is causing the repeating input, but with libGDX 1.6.0 and VisUI 0.7.7-SNAPSHOT it isn't working for me. I will test a bit to see if I can find what exactly causes the problem.

from vis-ui.

kotcrab avatar kotcrab commented on July 17, 2024

The new behavior is to restore last valid entered value when field loses focus. This allows to enters all values while text field has focus but when focus is lost the last valid value will be restored (or the minimum set value if field was empty).

You can't force selector to be not empty, that would cause the same issue as you described in your first message.

You should try if that repeat bug occurs in VisValidableTextField, then we will know if it is related to number selector or the text filed itself.

from vis-ui.

LoekSangers avatar LoekSangers commented on July 17, 2024

I get the same problem with VisValidatableTextField, so it is the textfield itself.

And i don't see any changes with the NumberSelector, but i don't know if I should see that already or if that takes some time =).

from vis-ui.

kotcrab avatar kotcrab commented on July 17, 2024

Okay, now if you could test it in VisTextField and standard libGDX TextField. You can pass VisUI.getSkin() to TextField constructor, they are compatible.

Changing commit is here b60eca3 but snapshots takes some time to update (typically 10 mins), also don't forget to refresh Gradle caches / dependencies.

from vis-ui.

LoekSangers avatar LoekSangers commented on July 17, 2024

The virtual keyboard works without repeating charactersin the the libGDX TextField, but the VisTextField has the repeating characters.

from vis-ui.

kotcrab avatar kotcrab commented on July 17, 2024

Thanks, that's helpful, I can reproduce it now. This issue is caused by key repeat task in VisTextField which works in different way than in TextField, I'm looking into it.

from vis-ui.

LoekSangers avatar LoekSangers commented on July 17, 2024

Thanks for looking into it and for making VisUI =).

from vis-ui.

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.