Upgraded demos to new non-block popup APIs

This commit is contained in:
vurtun 2016-09-15 20:18:41 +02:00
parent 85d109e351
commit e4623c7f8a
8 changed files with 7 additions and 8 deletions

View File

@ -1,5 +1,4 @@
# Changelog
- 2016/09/13 (1.15) - !BREAKING! Fixed nonblocking popup behavior in menu, combo,
and contextual which prevented closing in y-direction if
popup did not reach max height.

View File

@ -231,7 +231,7 @@ int main(void)
nk_layout_row_dynamic(ctx, 20, 1);
nk_label(ctx, "background:", NK_TEXT_LEFT);
nk_layout_row_dynamic(ctx, 25, 1);
if (nk_combo_begin_color(ctx, &combo, background, 400)) {
if (nk_combo_begin_color(ctx, &combo, background, nk_vec2(nk_widget_width(ctx),400))) {
nk_layout_row_dynamic(ctx, 120, 1);
background = nk_color_picker(ctx, background, NK_RGBA);
nk_layout_row_dynamic(ctx, 25, 1);

View File

@ -127,7 +127,7 @@ int main(void)
nk_layout_row_dynamic(ctx, 20, 1);
nk_label(ctx, "background:", NK_TEXT_LEFT);
nk_layout_row_dynamic(ctx, 25, 1);
if (nk_combo_begin_color(ctx, &combo, background, 400)) {
if (nk_combo_begin_color(ctx, &combo, background, nk_vec2(nk_widget_width(ctx),400))) {
nk_layout_row_dynamic(ctx, 120, 1);
background = nk_color_picker(ctx, background, NK_RGBA);
nk_layout_row_dynamic(ctx, 25, 1);

View File

@ -141,7 +141,7 @@ int main(void)
nk_layout_row_dynamic(ctx, 20, 1);
nk_label(ctx, "background:", NK_TEXT_LEFT);
nk_layout_row_dynamic(ctx, 25, 1);
if (nk_combo_begin_color(ctx, &combo, background, 400)) {
if (nk_combo_begin_color(ctx, &combo, background, nk_vec2(nk_widget_width(ctx),400))) {
nk_layout_row_dynamic(ctx, 120, 1);
background = nk_color_picker(ctx, background, NK_RGBA);
nk_layout_row_dynamic(ctx, 25, 1);

View File

@ -138,7 +138,7 @@ main(int argc, char* argv[])
nk_layout_row_dynamic(ctx, 20, 1);
nk_label(ctx, "background:", NK_TEXT_LEFT);
nk_layout_row_dynamic(ctx, 25, 1);
if (nk_combo_begin_color(ctx, &combo, background, 400)) {
if (nk_combo_begin_color(ctx, &combo, background, nk_vec2(nk_widget_width(ctx),400))) {
nk_layout_row_dynamic(ctx, 120, 1);
background = nk_color_picker(ctx, background, NK_RGBA);
nk_layout_row_dynamic(ctx, 25, 1);

View File

@ -146,7 +146,7 @@ main(int argc, char* argv[])
nk_layout_row_dynamic(ctx, 20, 1);
nk_label(ctx, "background:", NK_TEXT_LEFT);
nk_layout_row_dynamic(ctx, 25, 1);
if (nk_combo_begin_color(ctx, &combo, background, 400)) {
if (nk_combo_begin_color(ctx, &combo, background, nk_vec2(nk_widget_width(ctx),400))) {
nk_layout_row_dynamic(ctx, 120, 1);
background = nk_color_picker(ctx, background, NK_RGBA);
nk_layout_row_dynamic(ctx, 25, 1);

View File

@ -274,7 +274,7 @@ int main(int argc, char **argv)
nk_layout_row_dynamic(ctx, 20, 1);
nk_label(ctx, "background:", NK_TEXT_LEFT);
nk_layout_row_dynamic(ctx, 25, 1);
if (nk_combo_begin_color(ctx, &combo, background, 400)) {
if (nk_combo_begin_color(ctx, &combo, background, nk_vec2(nk_widget_width(ctx),400))) {
nk_layout_row_dynamic(ctx, 120, 1);
background = nk_color_picker(ctx, background, NK_RGBA);
nk_layout_row_dynamic(ctx, 25, 1);

View File

@ -271,7 +271,7 @@ int main(int argc, char **argv)
nk_layout_row_dynamic(ctx, 20, 1);
nk_label(ctx, "background:", NK_TEXT_LEFT);
nk_layout_row_dynamic(ctx, 25, 1);
if (nk_combo_begin_color(ctx, &combo, background, 400)) {
if (nk_combo_begin_color(ctx, &combo, background, nk_vec2(nk_widget_width(ctx),400))) {
nk_layout_row_dynamic(ctx, 120, 1);
background = nk_color_picker(ctx, background, NK_RGBA);
nk_layout_row_dynamic(ctx, 25, 1);