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
BlidDev edited this page Jan 9, 2024
·
3 revisions
Overview:
Aside from traditional std::cin style user input shown in input_and_output, Niv offers a way to check immidate keyboard key presses.
handle_input
usage example:
handle_input
Desc:
When graphics are initilized: Refreshes the graphics window (i.e. make it respond to OS GUI input like the X button); Refreshes the pressed-keys buffer.
When graphics are not initilized: Only refreshes the key-pressed buffer.
Return value: Retruns true if the graphics window should close, otherwise (and when graphics aren't initilized) false.
For more complex examples check one of the graphical examples in the examples folder.