X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=vg_imgui.h;h=4433b2a2d9b650d7cdd576618297d7bd0baa37f5;hb=76d234b7dc5e6500e8a54009b367e7620f11ef97;hp=6e8537c2882bd142880951432325396ac1acdd26;hpb=3013df439a15c3c4b4078ea9724f15d6a1cb3820;p=vg.git diff --git a/vg_imgui.h b/vg_imgui.h index 6e8537c..4433b2a 100644 --- a/vg_imgui.h +++ b/vg_imgui.h @@ -358,7 +358,7 @@ static struct vg_shader _shader_ui_image = { } }; -VG_STATIC void _vg_ui_init(void){ +static void _vg_ui_init(void){ if( !vg_shader_compile( &_shader_ui ) || !vg_shader_compile( &_shader_ui_image ) ) vg_fatal_error( "Failed to compile ui shader" ); @@ -475,7 +475,7 @@ static void rect_copy( ui_rect a, ui_rect b ){ b[i] = a[i]; } -VG_STATIC void ui_flush( enum ui_shader shader ){ +static void ui_flush( enum ui_shader shader ){ u32 vertex_offset = vg_ui.vert_start*sizeof(ui_vert), vertex_count = vg_ui.cur_vert-vg_ui.vert_start, vertex_size = vertex_count*sizeof(ui_vert), @@ -984,12 +984,17 @@ static void ui_standard_widget( ui_rect inout_panel, ui_rect out_rect, out_rect, inout_panel ); } +static void ui_info( ui_rect inout_panel, const char *text ){ + ui_rect box; + ui_standard_widget( inout_panel, box, 1 ); + ui_text( box, text, 1, k_ui_align_middle_left, 0 ); +} static void ui_image( ui_rect rect, GLuint image ){ ui_flush( k_ui_shader_colour ); glActiveTexture( GL_TEXTURE0 ); glBindTexture( GL_TEXTURE_2D, image ); - ui_fill_rect( rect, 0xffffffff, (ui_px[4]){ 0,128, 128, 0 } ); + ui_fill_rect( rect, 0xffffffff, (ui_px[4]){ 0,256,256,0 } ); ui_flush( k_ui_shader_image ); } @@ -2041,7 +2046,7 @@ static void _ui_proc_key( SDL_Keysym ev ){ /* * Callback for text entry mode */ -VG_STATIC void ui_proc_utf8( const char *text ){ +static void ui_proc_utf8( const char *text ){ if( vg_ui.focused_control_type == k_ui_control_textbox ){ const char *ptr = text;