@@ -3799,6 +3799,11 @@ public static Vector2 GetCursorStartPos()
37993799 Vector2 ret = ImGuiNative . igGetCursorStartPos ( ) ;
38003800 return ret ;
38013801 }
3802+ public static ImGuiPayloadPtr GetDragDropPayload ( )
3803+ {
3804+ ImGuiPayload * ret = ImGuiNative . igGetDragDropPayload ( ) ;
3805+ return new ImGuiPayloadPtr ( ret ) ;
3806+ }
38023807 public static ImDrawDataPtr GetDrawData ( )
38033808 {
38043809 ImDrawData * ret = ImGuiNative . igGetDrawData ( ) ;
@@ -7132,14 +7137,14 @@ public static void SetScrollFromPosY(float pos_y, float center_y_ratio)
71327137 {
71337138 ImGuiNative . igSetScrollFromPosY ( pos_y , center_y_ratio ) ;
71347139 }
7135- public static void SetScrollHere ( )
7140+ public static void SetScrollHereY ( )
71367141 {
71377142 float center_y_ratio = 0.5f ;
7138- ImGuiNative . igSetScrollHere ( center_y_ratio ) ;
7143+ ImGuiNative . igSetScrollHereY ( center_y_ratio ) ;
71397144 }
7140- public static void SetScrollHere ( float center_y_ratio )
7145+ public static void SetScrollHereY ( float center_y_ratio )
71417146 {
7142- ImGuiNative . igSetScrollHere ( center_y_ratio ) ;
7147+ ImGuiNative . igSetScrollHereY ( center_y_ratio ) ;
71437148 }
71447149 public static void SetScrollX ( float scroll_x )
71457150 {
@@ -7422,9 +7427,18 @@ public static bool SliderAngle(string label, ref float v_rad)
74227427 else { native_label = null ; }
74237428 float v_degrees_min = - 360.0f ;
74247429 float v_degrees_max = + 360.0f ;
7430+ byte * native_format ;
7431+ int format_byteCount = Encoding . UTF8 . GetByteCount ( "%.0f deg" ) ;
7432+ byte * native_format_stackBytes = stackalloc byte [ format_byteCount + 1 ] ;
7433+ native_format = native_format_stackBytes ;
7434+ fixed ( char * format_ptr = "%.0f deg" )
7435+ {
7436+ int native_format_offset = Encoding . UTF8 . GetBytes ( format_ptr , "%.0f deg" . Length , native_format , format_byteCount ) ;
7437+ native_format [ native_format_offset ] = 0 ;
7438+ }
74257439 fixed ( float * native_v_rad = & v_rad )
74267440 {
7427- byte ret = ImGuiNative . igSliderAngle ( native_label , native_v_rad , v_degrees_min , v_degrees_max ) ;
7441+ byte ret = ImGuiNative . igSliderAngle ( native_label , native_v_rad , v_degrees_min , v_degrees_max , native_format ) ;
74287442 return ret != 0 ;
74297443 }
74307444 }
@@ -7444,9 +7458,18 @@ public static bool SliderAngle(string label, ref float v_rad, float v_degrees_mi
74447458 }
74457459 else { native_label = null ; }
74467460 float v_degrees_max = + 360.0f ;
7461+ byte * native_format ;
7462+ int format_byteCount = Encoding . UTF8 . GetByteCount ( "%.0f deg" ) ;
7463+ byte * native_format_stackBytes = stackalloc byte [ format_byteCount + 1 ] ;
7464+ native_format = native_format_stackBytes ;
7465+ fixed ( char * format_ptr = "%.0f deg" )
7466+ {
7467+ int native_format_offset = Encoding . UTF8 . GetBytes ( format_ptr , "%.0f deg" . Length , native_format , format_byteCount ) ;
7468+ native_format [ native_format_offset ] = 0 ;
7469+ }
74477470 fixed ( float * native_v_rad = & v_rad )
74487471 {
7449- byte ret = ImGuiNative . igSliderAngle ( native_label , native_v_rad , v_degrees_min , v_degrees_max ) ;
7472+ byte ret = ImGuiNative . igSliderAngle ( native_label , native_v_rad , v_degrees_min , v_degrees_max , native_format ) ;
74507473 return ret != 0 ;
74517474 }
74527475 }
@@ -7465,9 +7488,52 @@ public static bool SliderAngle(string label, ref float v_rad, float v_degrees_mi
74657488 }
74667489 }
74677490 else { native_label = null ; }
7491+ byte * native_format ;
7492+ int format_byteCount = Encoding . UTF8 . GetByteCount ( "%.0f deg" ) ;
7493+ byte * native_format_stackBytes = stackalloc byte [ format_byteCount + 1 ] ;
7494+ native_format = native_format_stackBytes ;
7495+ fixed ( char * format_ptr = "%.0f deg" )
7496+ {
7497+ int native_format_offset = Encoding . UTF8 . GetBytes ( format_ptr , "%.0f deg" . Length , native_format , format_byteCount ) ;
7498+ native_format [ native_format_offset ] = 0 ;
7499+ }
7500+ fixed ( float * native_v_rad = & v_rad )
7501+ {
7502+ byte ret = ImGuiNative . igSliderAngle ( native_label , native_v_rad , v_degrees_min , v_degrees_max , native_format ) ;
7503+ return ret != 0 ;
7504+ }
7505+ }
7506+ public static bool SliderAngle ( string label , ref float v_rad , float v_degrees_min , float v_degrees_max , string format )
7507+ {
7508+ byte * native_label ;
7509+ if ( label != null )
7510+ {
7511+ int label_byteCount = Encoding . UTF8 . GetByteCount ( label ) ;
7512+ byte * native_label_stackBytes = stackalloc byte [ label_byteCount + 1 ] ;
7513+ native_label = native_label_stackBytes ;
7514+ fixed ( char * label_ptr = label )
7515+ {
7516+ int native_label_offset = Encoding . UTF8 . GetBytes ( label_ptr , label . Length , native_label , label_byteCount ) ;
7517+ native_label [ native_label_offset ] = 0 ;
7518+ }
7519+ }
7520+ else { native_label = null ; }
7521+ byte * native_format ;
7522+ if ( format != null )
7523+ {
7524+ int format_byteCount = Encoding . UTF8 . GetByteCount ( format ) ;
7525+ byte * native_format_stackBytes = stackalloc byte [ format_byteCount + 1 ] ;
7526+ native_format = native_format_stackBytes ;
7527+ fixed ( char * format_ptr = format )
7528+ {
7529+ int native_format_offset = Encoding . UTF8 . GetBytes ( format_ptr , format . Length , native_format , format_byteCount ) ;
7530+ native_format [ native_format_offset ] = 0 ;
7531+ }
7532+ }
7533+ else { native_format = null ; }
74687534 fixed ( float * native_v_rad = & v_rad )
74697535 {
7470- byte ret = ImGuiNative . igSliderAngle ( native_label , native_v_rad , v_degrees_min , v_degrees_max ) ;
7536+ byte ret = ImGuiNative . igSliderAngle ( native_label , native_v_rad , v_degrees_min , v_degrees_max , native_format ) ;
74717537 return ret != 0 ;
74727538 }
74737539 }
0 commit comments