private static unsafe bool InputScalar <T>(string label, ImGuiDataType dataType, ref T val, T?step, T?stepFast, GUIInputTextFlags flags, string fmt) where T : unmanaged { float itemSize = GUIUtility.GetPreferredElementWidthSize(1, !string.IsNullOrEmpty(fmt)); GUIUtility.TextIndentFunction(fmt); IntPtr valPtr; IntPtr stepPtr = IntPtr.Zero; IntPtr stepFastPtr = IntPtr.Zero; fixed(T *ptr = &val) { valPtr = (IntPtr)ptr; } if (step.HasValue) { T temp = step.Value; stepPtr = (IntPtr)(&temp); } if (stepFast.HasValue) { T temp = stepFast.Value; stepFastPtr = (IntPtr)(&temp); } SetNextItemWidth(itemSize); return(ImGui.InputScalar(label, dataType, valPtr, stepPtr, stepFastPtr, fmt, (ImGuiInputTextFlags)flags)); }
public static bool DragScalarN(string label, ImGuiDataType data_type, IntPtr v, int components, float v_speed, IntPtr v_min, IntPtr v_max) { return(ImGui.DragScalarN(label, data_type, v, components, v_speed, v_min, v_max)); }
public static bool DragScalarN(string label, ImGuiDataType data_type, IntPtr v, int components, float v_speed, IntPtr v_min, IntPtr v_max, string format, ImGuiSliderFlags flags) { return(ImGui.DragScalarN(label, data_type, v, components, v_speed, v_min, v_max, format, flags)); }
public static bool DragScalar(string label, ImGuiDataType data_type, IntPtr v, float v_speed) { return(ImGui.DragScalar(label, data_type, v, v_speed)); }
public static bool DragScalar(string label, ImGuiDataType data_type, IntPtr v, float v_speed, IntPtr v_min, IntPtr v_max, string format) { return(ImGui.DragScalar(label, data_type, v, v_speed, v_min, v_max, format)); }
public static bool InputScalarN(string label, ImGuiDataType data_type, IntPtr p_data, int components, IntPtr p_step = default, IntPtr p_step_fast = default, string format = null) => InputScalarN(label, data_type, p_data, components, p_step, p_step_fast, format, ImGuiInputTextFlags.None);
public static bool VSliderScalar(string label, ImVec2 size, ImGuiDataType data_type, IntPtr p_data, IntPtr p_min, IntPtr p_max, string format = null) => VSliderScalar(label, size, data_type, p_data, p_min, p_max, format, ImGuiSliderFlags.None);
public static bool SliderScalarN(string label, ImGuiDataType data_type, IntPtr p_data, int components, IntPtr p_min, IntPtr p_max, string format = null) => SliderScalarN(label, data_type, p_data, components, p_min, p_max, format, ImGuiSliderFlags.None);
public static bool DragScalarN(string label, ImGuiDataType data_type, IntPtr p_data, int components, float v_speed = 1.0f, IntPtr p_min = default, IntPtr p_max = default, string format = null) => DragScalarN(label, data_type, p_data, components, v_speed, p_min, p_max, format, default);
public abstract byte igInputScalarN(byte *label, ImGuiDataType data_type, void *v, int components, void *step, void *step_fast, byte *format, ImGuiInputTextFlags extra_flags);
public abstract byte igDragScalar(byte *label, ImGuiDataType data_type, void *v, float v_speed, void *v_min, void *v_max, byte *format, float power);
public abstract byte igSliderScalarN(byte *label, ImGuiDataType data_type, void *v, int components, void *v_min, void *v_max, byte *format, float power);
public abstract byte igVSliderScalar(byte *label, Vector2 size, ImGuiDataType data_type, void *v, void *v_min, void *v_max, byte *format, float power);
public static extern bool InputScalarFloat(string label, ImGuiDataType data_type, ref float p_data, ref float p_step, ref float p_step_fast, string format, ImGuiInputTextFlags flags);