fix uninitialized rigidbody
authorhgn <hgodden00@gmail.com>
Wed, 31 Jan 2024 15:22:15 +0000 (15:22 +0000)
committerhgn <hgodden00@gmail.com>
Wed, 31 Jan 2024 15:22:15 +0000 (15:22 +0000)
vg_imgui.h

index 5c957ed2ba1b053b3002e4e64299b8a7d8b7c2d4..b3dfa6a23aec7dc5f64abc392f38162b74e1089a 100644 (file)
@@ -1476,6 +1476,7 @@ static void ui_colourpicker( ui_rect inout_panel, const char *str_label,
 
    v4f hsv;
    vg_rgb_hsv( value, hsv );
+   hsv[3] = value[3];
 
    enum ui_button_state modified = 0x00;
 
@@ -1512,6 +1513,7 @@ static void ui_colourpicker( ui_rect inout_panel, const char *str_label,
    if( modified & (k_ui_button_click|k_ui_button_holding_inside|
                    k_ui_button_holding_outside) ){
       vg_hsv_rgb( hsv, value );
+      value[3] = hsv[3];
    }
 
    ui_outline( square, 1, ui_colour( state? k_ui_fg+3: k_ui_bg+3 ), 0 );