Immediate-Mode-UI / Immediate-Mode-UI/Nuklear

Possible to get nk_combo (Combobox) "DropUp"?

Open
#110 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
11.4k
Forks
686
Avg merge
4d 1h
Merged PRs (30d)
3

Description

It's possible to get nk_combo_begin_label (as example) get "drop up" beside default dropdown?
Example code:
```
if (nk_begin(&ctx, "StatusBar", nk_rect(0, height-80, width, 80), NK_WINDOW_NO_SCROLLBAR))
{
nk_layout_row_dynamic(&ctx, 30, 3);
nk_label(&ctx, g_GUIData.strPartsCount, NK_TEXT_LEFT);
nk_label(&ctx, g_GUIData.strParamsCount, NK_TEXT_LEFT);
static int selected_item = 0;
static const char *items[] = { "Item 0","item 1","item 2" };
if (nk_combo_begin_label(&ctx, items[selected_item], nk_vec2(nk_widget_width(&ctx), 35))) {
nk_layout_row_dynamic(&ctx, 35, 1);
for (int i = 0; i < 3; ++i)
if (nk_combo_item_label(&ctx, items[i], NK_TEXT_LEFT))
selected_item = i;
nk_combo_end(&ctx);
}
nk_end(&ctx);
}
```
On screenshot dropdown combobox. Can I set layout row upper uses absolute coordinates, it's possible?
![example](https://user-images.githubusercontent.com/6906978/79077107-8ce0b080-7d07-11ea-98d1-19474aabf674.png)

Contributor guide

Open the contributing guide

Research direction

Start at the nk_combo_begin_label and nk_combo_end entry points shown in the example, and compare their current behavior with the attached drop-up screenshot. Trace how the combo's popup position is selected and determine how an upper-opening option could coexist with the default dropdown. Done means the example can open the combobox upward when requested without breaking the existing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
desktop
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.