Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Begin child with size param #39

Closed

Conversation

techmindful
Copy link
Contributor

Not ready to merge yet, but issue can be discussed.

This is either a pull request or an issue. The current bindings to functions like ImGui::BeginChild doesn't cover optional params. When working on my app, I needed to set a child window's size, which is such an optional param. I tried to modify beginChild in place to take more params, but that broke some example build targets, since they didn't supply enough params to the new beginChild.

So I think the options are:

  1. Modify functions like beginChild in place, and fix the code for example build targets.
  2. Create a new function named like beginChildOfSize or beginChildWithOptParams, which is what this branch is currently doing.

@ocharles
Copy link
Member

See also #33

@techmindful
Copy link
Contributor Author

See also #33

From that pull request, one option is to write something like beginChildFull, similar to what I'm doing.
Another option seems to be at the bottom, with generic-lens. I know the basics of lens, but haven't dived deep enough to understand any of the lens usage occurred there. Are you familiar with lens enough to further decisions on that?

@dpwiz
Copy link
Member

dpwiz commented Sep 12, 2021

Upon closer inspection it is the other way around - beginChild should use all the arguments, and "default arguments" mode of operation is a "trick".

I've got this sorted in #93

@dpwiz dpwiz closed this Sep 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants