bad char
[vg.git] / vg_engine.c
index 0e59528a47c61328ded87fe6703013905cd4722c..fe3a7e95bee5deda6246917e9850d0592c3f8351 100644 (file)
@@ -141,9 +141,6 @@ static void _vg_process_events(void)
    v2_zero( vg.mouse_wheel );
    v2_zero( vg.mouse_delta );
 
-   /* Update input */
-   vg_process_inputs();
-
    /* SDL event loop */
    SDL_Event event;
    while( SDL_PollEvent( &event ) ){
@@ -221,6 +218,7 @@ static void _vg_process_events(void)
    }
 
    SDL_GetMouseState( &vg.mouse_pos[0], &vg.mouse_pos[1] );
+   vg_process_inputs();
 }
 
 static void _vg_gameloop_update(void)
@@ -887,7 +885,7 @@ void vg_settings_ui_header( ui_rect inout_panel, const char *name )
 bool vg_settings_apply_button( ui_rect inout_panel, bool validated )
 {
    ui_rect last_row;
-   ui_px height = (vg_ui.font->glyph_height + 18) * k_ui_scale;
+   ui_px height = (vg_ui.font->sy + 18) * k_ui_scale;
    ui_split( inout_panel, k_ui_axis_h, -height, k_ui_padding, 
              inout_panel, last_row );
 
@@ -1130,7 +1128,8 @@ static void vg_settings_gui(void)
    ui_rect quit_button;
    ui_split( title, k_ui_axis_v, title[2]-title[3], 2, title, quit_button );
 
-   if( ui_button_text( quit_button, "X", 1 ) == 1 ){
+   if( ui_button_text( quit_button, "X", 1 ) == k_ui_button_click )
+   {
       vg_settings_close();
       return;
    }