8000 Tree related helper function TreeNodeToLabelSpacing is missing · Issue #45 · inkyblackness/imgui-go · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Dec 31, 2022. It is now read-only.

Tree related helper function TreeNodeToLabelSpacing is missing #45

Closed
futjikato opened this issue Sep 1, 2019 · 5 comments
8000
Closed

Tree related helper function TreeNodeToLabelSpacing is missing #45

futjikato opened this issue Sep 1, 2019 · 5 comments

Comments

@futjikato
Copy link

Hi,

TreeAdvanceToLabelPos as well as GetTreeNodeToLabelSpacing are missing. This makes it a little harder to build nicely aligned tree menus. Is this a scope related choice not to expose these?

I am not a C/C++ dev myself and as such cant promise to make a pull request even if the addition is in scope. But I could give it a try.

@dertseha
Copy link
Member
dertseha commented Sep 1, 2019

Hello @futjikato , thank you for your message!
They are not intentionally hidden, just not yet required so far.
These are simple functions, you should be able to add them if you like - see for similar functions on how it is done.
For instance, TreeAdvanceToLabelPos() would be similar to TreePop(), so follow its wrapper implementation and essentially copy/paste :)
TreeNodeToLabelSpacing() isn't much different, only add a return value of float32 (and keep in mind, getter names don't have the prefix Get in go.
Take the documentation from imgui.h for the functions and you are good to go :)

@futjikato
Copy link
Author

Thanks! Will try to make a PR later today

@futjikato futjikato changed the title Some Tree related helper functions are missing Tree related helper function TreeNodeToLabelSpacing is missing Sep 2, 2019
@futjikato
Copy link
Author

As of Juli 2019 TreeAdvanceToLabelPos is deprecated so I will just add TreeNodeToLabelSpacing as that seems to be the replacement.
See: https://github.com/ocornut/imgui/ 8000 blob/master/imgui.h#L1542

@futjikato
Copy link
Author

See PR #46

@dertseha
Copy link
Member
dertseha commented Sep 5, 2019

Thank you for your contribution! I'll do a release with that soon, I first want to handle the other issue as well.

@dertseha dertseha closed this as completed Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0