You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 2, 2019. It is now read-only.
I am unable to get nk_edit_string_zero_terminated to scroll to the end of the output.
Neighter automatically or on focus. NK_EDIT_GOTO_END_ON_ACTIVATE does not seem to make any difference.
Here is a gist of some code that demonstrates undesired behavior: it always shows "line: 1", but I want it to show ~ "line: 40" -> "line: 49" due to the limited window_height.
int const window_width = 500;
int const window_height = 200;
std::ostringstream ss;
for (std::size_t i = 0; i < 50; ++i) {
ss << "line: " << i << "\n";
}
while (!glfwWindowShouldClose(win)) {
glfwPollEvents();
nk_glfw3_new_frame();
if (nk_begin(ctx, /* Items */"", nk_rect(0, 0, float(width), float(height)), 0)) {
nk_layout_row_begin(ctx, NK_STATIC, float(height) - 52, 1);
nk_layout_row_push(ctx, float(width) - 23);
nk_flags event = nk_edit_string_zero_terminated(ctx,
NK_EDIT_SELECTABLE | NK_EDIT_MULTILINE | NK_EDIT_CLIPBOARD | NK_EDIT_GOTO_END_ON_ACTIVATE,
ss.str().data(), ss.str().size(), nk_filter_ascii
);
nk_layout_row_end(ctx);
}
nk_end(ctx);
...
}
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
I am unable to get
nk_edit_string_zero_terminated
to scroll to the end of the output.Neighter automatically or on focus.
NK_EDIT_GOTO_END_ON_ACTIVATE
does not seem to make any difference.Here is a gist of some code that demonstrates undesired behavior: it always shows "line: 1", but I want it to show ~ "line: 40" -> "line: 49" due to the limited window_height.
The text was updated successfully, but these errors were encountered: