textbox
[vg.git] / vg.h
diff --git a/vg.h b/vg.h
index 0be8031aec1d230718ef78a2cb3e9add81797c5a..64f9187a3befde770f71dc15889c5f12145d3f08 100644 (file)
--- a/vg.h
+++ b/vg.h
@@ -332,7 +332,8 @@ VG_STATIC void _vg_process_events(void)
    SDL_Event event;
    while( SDL_PollEvent( &event ) ){
       if( event.type == SDL_KEYDOWN ){
-         console_proc_key( event.key.keysym );
+         //console_proc_key( event.key.keysym );
+         _ui_proc_key( event.key.keysym );
       }
       else if( event.type == SDL_MOUSEWHEEL ){
          vg.mouse_wheel[0] += event.wheel.preciseX;
@@ -374,7 +375,8 @@ VG_STATIC void _vg_process_events(void)
          }
       }
       else if( event.type == SDL_TEXTINPUT ){
-         console_proc_utf8( event.text.text );
+         //console_proc_utf8( event.text.text );
+         ui_proc_utf8( event.text.text );
       }
    }
 
@@ -757,6 +759,9 @@ VG_STATIC void _vg_init_window( const char *window_name )
 
    vg_info( "CreateContext\n" );
 
+   /* ????? */
+   if( SDL_IsTextInputActive() ) SDL_StopTextInput();
+
    /* 
     * OpenGL loading 
     */