Skip to content
This repository has been archived by the owner on Dec 2, 2019. It is now read-only.

Fix backspace key handling on the SFML OpenGL2 platform demo #932

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions demo/sfml_opengl2/nuklear_sfml_gl2.h
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,11 @@ nk_sfml_handle_event(sf::Event* evt)
} else nk_input_motion(ctx, evt->touch.x, evt->touch.y);
return 1;
} else if(evt->type == sf::Event::TextEntered) {
nk_input_unicode(ctx, evt->text.unicode);
return 1;
if (evt->text.unicode != 8) {
// don't pass backspace (ascii code 8)
nk_input_unicode(ctx, evt->text.unicode);
}
return 1;
} else if(evt->type == sf::Event::MouseWheelScrolled) {
nk_input_scroll(ctx, nk_vec2(0,evt->mouseWheelScroll.delta));
return 1;
Expand Down