SpaiR / imgui-java

JNI based binding for Dear ImGui
MIT License
546 stars 89 forks source link

ImGui::TableGetSortSpecs() missing #114

Open Lenni0451 opened 2 years ago

Lenni0451 commented 2 years ago

There is no binding for ImGui::TableGetSortSpecs(). https://github.com/ocornut/imgui/blob/master/imgui_demo.cpp#L5081

phraktle commented 1 year ago

I would be interested in seeing this exposed. Is there a workaround to get which column the table is sorted on?

Lenni0451 commented 1 year ago

I don't think there is a workaround at the moment

phraktle commented 1 year ago

You can work out which column is sorted from the column flags, alas the direction is not exposed.

assada commented 1 year ago

Zero chance to implement table sorting wihout TableGetSortSpecs

ultraq commented 1 month ago

In case anybody else might find it useful, I implemented ImGui.tableGetSortSpecs() for the single sorting column use case on my own fork of imgui-java in this commit which people can copy: https://github.com/ultraq/imgui-java/commit/00fd84f2e7cf6b00e7895cb45f84ac16d0078b95

I expect that whenever the new API generation in #132 happens, which will probably also solve the multi-column sorting use case, then this will be out of date.