Giter Site home page Giter Site logo

Comments (3)

TNicoletti avatar TNicoletti commented on August 15, 2024

It seems to me that it always increases when the value of the tick is at least greater than half the step, if we get the step to 0.005 it will increase for any value greater than 0.0025, for example 0.00251, but not for 0.00250. If we set the value of the step to 0.1, it will not increase for 0.05 for another example(but it gets stuck at 2% for some reason). A lot of the godot issues are rules that are there but are simply not written anywhere.

from godot.

ivoiv avatar ivoiv commented on August 15, 2024

You're right, it does seem to accept values greater than half the step.
I still doubt this is intended behavior, it just sounds very arbitrary.
It should either respect the step as a hard limit or it should not.

I'm trying to find where it's happening but I don't have the repo locally and CPP isnt my first language.

It should be happening somewhere in Range as that's where ProgressBar inherits and there's a lot of clamping and rounding happening.
There's a reference to some Ratio that isn't in the editor even tho it seems like it should. Calls some set_as_ratio
https://github.com/godotengine/godot/blob/2b11d0ca966e93c621dccc57951ccbe2a0133251/scene/gui/range.cpp

I'll dig more tomorrow if I get time but I have a hunch it's a rounding thing as 0.006 is definitely closer to 0.01 than it is to 0.00 whereas it maybe it floors 0.05down to 0 somehow..

from godot.

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.