Add to ComboBox "DropUp" if no space available to DropDown.
Add ComboBox "DropUp" if no space available in layout height. #110
Thanks for the prompt response. Before we'll dive into this, could you please check how PRs are getting reviewed?
Hmm. I'm not sure if this is quite the right approach. I guess that depends on the wanted behavior. Currently, the dropdown is allowed to go out of the window, and this isn't really a problem unless it actually escapes the programs window.

I'd say the best approach might be to break the combo box api to allow specifying whether the thing drops down or up. Maybe something like this:
enum nk_drop_direction {
NK_DROP_UP,
NK_DROP_DOWN,
NK_DROP_AUTO = NK_DROP_AUTO_PREFER_DOWN,
/* Drops down, unless there isn't room in the window, in which case it drops up */
NK_DROP_AUTO_PREFER_DOWN,
/* Drops up, unless there isn't room in the window, in which case it drops down */
NK_DROP_AUTO_PREFER_UP,
}
It not break if we set before call nk_combo_begin As example nk_combo_set_direction(NK_DROP_AUTO_PREFER_UP) But it will create more complexity...
Thanks for the prompt response. Before we'll dive into this, could you please check how PRs are getting reviewed?
yep commentary in code excessless...
It not break if we set before call nk_combo_begin As example nk_combo_set_direction(NK_DROP_AUTO_PREFER_UP) But it will create more complexity...
Hmm, yea that could work. I do think passing it in directly is a better API choice, and we're are not afraid of doing breaking changes as long as it is versioned appropriately. I'll leave it up to you whether you want to break API or not. I think both approaches are fine.
If we Break API need more changes for some reason, not just add ComboBox to display mode.... But I think change API also better.
Something like this.
.
Very cool. I'll see if I can take a look at this code over the weekend. I'll assume this new API is good unless someone else complains :)
Found something doing wrong in my code...
If we pass to combobox bigger height it clip in "ctx->popup" layout.
On drop down works fine because it's clip it by height (start point at y is correct) but on drop up start point at y based input height.
I need figure out and understand how to move start y position on all combobox "popup-ed" layouts based on clipping height...
Of course we can precalculate height based on elements in combo-box, but this it not solution.
Well need some more time then I expected :(
But in my setup it work... but it need to work not only in my setup :)