mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
build 180404. optional scenario clock sync with current local time, keyboard input for the ui layer
This commit is contained in:
7
EU07.cpp
7
EU07.cpp
@@ -148,11 +148,14 @@ void mouse_button_callback( GLFWwindow* window, int button, int action, int mods
|
||||
|
||||
void key_callback( GLFWwindow *window, int key, int scancode, int action, int mods ) {
|
||||
|
||||
input::Keyboard.key( key, action );
|
||||
|
||||
Global.shiftState = ( mods & GLFW_MOD_SHIFT ) ? true : false;
|
||||
Global.ctrlState = ( mods & GLFW_MOD_CONTROL ) ? true : false;
|
||||
|
||||
// give the ui first shot at the input processing...
|
||||
if( true == UILayer.on_key( key, action ) ) { return; }
|
||||
// ...if the input is left untouched, pass it on
|
||||
input::Keyboard.key( key, action );
|
||||
|
||||
if( ( true == Global.InputMouse )
|
||||
&& ( ( key == GLFW_KEY_LEFT_ALT )
|
||||
|| ( key == GLFW_KEY_RIGHT_ALT ) ) ) {
|
||||
|
||||
Reference in New Issue
Block a user