mirror of
https://github.com/Immediate-Mode-UI/Nuklear.git
synced 2026-11-30 16:48:10 +01:00
Merge pull request #655 from Artomatix/master
Make text edit scroll less when typing past the end
This commit is contained in:
@@ -17140,7 +17140,7 @@ nk_do_edit(nk_flags *state, struct nk_command_buffer *out,
|
||||
if (cursor_pos.x < edit->scrollbar.x)
|
||||
edit->scrollbar.x = (float)(int)NK_MAX(0.0f, cursor_pos.x - scroll_increment);
|
||||
if (cursor_pos.x >= edit->scrollbar.x + area.w)
|
||||
edit->scrollbar.x = (float)(int)NK_MAX(0.0f, cursor_pos.x);
|
||||
edit->scrollbar.x = (float)(int)NK_MAX(0.0f, edit->scrollbar.x + scroll_increment);
|
||||
} else edit->scrollbar.x = 0;
|
||||
|
||||
if (flags & NK_EDIT_MULTILINE) {
|
||||
|
||||
Reference in New Issue
Block a user