new font/ui fixes
[fishladder.git] / vg / vg_input.h
index 62dd4b15b39f381737d9a4f03f42da746541fd0f..69865427ba75c5f4ae76f1a1fd87467dd09b00e9 100644 (file)
@@ -89,6 +89,14 @@ static inline int vg_get_button_up( const char *button )
        return bind->prev & (bind->value ^ bind->prev) && !vg_console_enabled();
 }
 
+static inline int vg_get_button_state( const char *button )
+{
+       if( vg_get_button( button ) ) return 2;
+       if( vg_get_button_down( button ) ) return 1;
+       if( vg_get_button_up( button ) ) return 3;
+       return 0;
+}
+
 static inline int key_is_keyboard( int const id )
 {
        vg_static_assert( GLFW_MOUSE_BUTTON_LAST < GLFW_KEY_SPACE, "GLFW: Mouse has too many buttons" );