Giter Club home page Giter Club logo

Comments (8)

ocornut avatar ocornut commented on September 7, 2024

Please label your issues correctly. Clearly this has nothing to do with SetCursorPos().

What is wrong about this?
It seems that AddRect being min-inclusive and max-exclusive here is confusing the situation.

You have been posting dozens of bizarre, overly precise issues. What are you trying to do and to solve?

from imgui.

ocornut avatar ocornut commented on September 7, 2024

(Also please consider updating to 1.91.0 and not using those local-coordinate functions which have been obsoleted because don’t bring value but mostly confusion)

from imgui.

ElectroidDes avatar ElectroidDes commented on September 7, 2024

Please label your issues correctly. Clearly this has nothing to do with SetCursorPos().

What is wrong about this? It seems that AddRect being min-inclusive and max-exclusive here is confusing the situation.

You have been posting dozens of bizarre, overly precise issues. What are you trying to do and to solve?

I am pointing out an obvious problem.
If you think that incorrect positioning of an object using SetCursorPos is normal, then let this incorrect behavior remain in Imgui, I don't mind :)

from imgui.

ElectroidDes avatar ElectroidDes commented on September 7, 2024

GetWindowContentRegionMin

For me, GetWindow ContentRegionMin-GetWindowContentRegionMax are useful. With their help, I define the content rectangle in windows.

from imgui.

ocornut avatar ocornut commented on September 7, 2024

If you think that incorrect positioning of an object using SetCursorPos is normal, then let this incorrect behavior remain in Imgui, I don't mind :)

The problem is not in SetCursorPos() the problem might be in the value passed to it. This is like passing a wrong value to printf() and stating that printf() doesn’t work.

You have not answered my question. What are you trying to solve and do with all those dozen questions relative to micro pixel positioning of items?

from imgui.

ocornut avatar ocornut commented on September 7, 2024

For me, GetWindow ContentRegionMin-GetWindowContentRegionMax are useful. With their help, I define the content rectangle in windows.

As stated in 1.91 release note you can use GetCursorScreenPos() and GetContentRegionAvail() after Begin() and obtain the same values in absolute coordinates.

What’s the obvious problem?

I don’t see even a problem here, it looks correct to me. It is the AddRect call that draw rectangles this way.

If you don’t mind what you suggest is an “obviously incorrect behavior” not being fixed then please consider not posting as many issues, this may be hogging development resources. We want to solve real blocking problems that people have. If you have a problem we’ll help.

from imgui.

ElectroidDes avatar ElectroidDes commented on September 7, 2024

You have not answered my question. What are you trying to solve and do with all those dozen questions relative to micro pixel positioning of items?

This is a very strange question, frankly speaking. I am trying to make my widgets position correctly, and not arbitrarily. What kind of library is this that positions objects differently each time? It is difficult to do anything with such a mechanism - it is better to go and drown yourself.

Changed the frame width - all widgets "moved".
In one case, SetCursorPos positions correctly, in another it does not.

I gave a specific example: I position the Upper Left corner of the button to the GetWindowContentRegionMax coordinate and the screenshot shows that the positioning is incorrect. What is your question then?

from imgui.

ocornut avatar ocornut commented on September 7, 2024

I am giving up on trying to help you now, sorry. All the answers were already provided in my messages and you are not reading them.
It’s going to be too time consuming.

PS: For clarify I don't see anything incorrect about the screenshot you posted, and you haven't clarified what you think is incorrect.

from imgui.

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.