build 180404. optional scenario clock sync with current local time, keyboard input for the ui layer

This commit is contained in:
tmj-fstate
2018-04-06 01:12:15 +02:00
parent 07f14381a8
commit 87f078925c
12 changed files with 898 additions and 796 deletions

View File

@@ -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 ) ) ) {