modals
[vg.git] / vg.h
diff --git a/vg.h b/vg.h
index e632efae139614bd9ffb0ca95e619ba3983574a1..2a52614b5fc2803c56c0e328edae5e88d580a507 100644 (file)
--- a/vg.h
+++ b/vg.h
@@ -331,7 +331,8 @@ VG_STATIC void _vg_process_events(void)
    SDL_Event event;
    while( SDL_PollEvent( &event ) ){
       if( event.type == SDL_KEYDOWN ){
-         if( vg_console.enabled ){
+         if( vg_console.enabled && 
+               (vg_ui.focused_control_type != k_ui_control_modal) ){
             if( event.key.keysym.sym == SDLK_ESCAPE ||
                 event.key.keysym.sym == SDLK_BACKQUOTE ){
                vg_console.enabled = 0;