Draw XXL documentation


Handles Examples

This class is intended as an inspiration how Draw XXL could be used to supplement the development of custom handles. It doesn't claim to be complete or optimized, but gives coders some assistance to understand the general approach. You can browse the code of this class and will find code comments with explanations.

The basics boil down to:
The class contains the following example handle functions that already work when called from OnSceneGUI(). They take care of the Repaint event requirement by themselves.


Static Draw Functions
Preview Image Function Name
DrawLine(Vector3 start, Vector3 end, float thickness = 0.0f, DrawBasics.LineStyle style = DrawBasics.LineStyle.solid, string text = null)
SliderWithOffsetDisplay(Vector3 position, Vector3 direction)
SliderWithOffsetDisplay(Vector3 position, Vector3 direction, float size, Handles.CapFunction capFunction, float snap)
PercentageSlider(float valueToSlide, float valueThatDefines100percent, Vector3 position, Vector3 direction)
PercentageSlider(float valueToSlide, float valueThatDefines100percent, Vector3 position, Vector3 direction, DrawBasics.IconType icon)
PercentageSlider(float valueToSlide, float valueThatDefines100percent, Vector3 position, Vector3 direction, string text)
PercentageSlider(float valueToSlide, float valueThatDefines100percent, Vector3 position, Vector3 direction, float size, Handles.CapFunction capFunction, float snap, DrawBasics.IconType icon)
PercentageSlider(float valueToSlide, float valueThatDefines100percent, Vector3 position, Vector3 direction, float size, Handles.CapFunction capFunction, float snap, string text = null)
RangeSlider(float value, float lowerEndOfRange, float upperEndOfRange, Vector3 position, Vector3 direction)
RangeSlider(float value, float lowerEndOfRange, float upperEndOfRange, Vector3 position, Vector3 direction, DrawBasics.IconType icon)
RangeSlider(float value, float lowerEndOfRange, float upperEndOfRange, Vector3 position, Vector3 direction, string text)
RangeSlider(float value, float lowerEndOfRange, float upperEndOfRange, Vector3 position, Vector3 direction, float size, Handles.CapFunction capFunction, float snap, DrawBasics.IconType icon)
RangeSlider(float value, float lowerEndOfRange, float upperEndOfRange, Vector3 position, Vector3 direction, float size, Handles.CapFunction capFunction, float snap, string text = null)
DiscWithAngleDisplay(Quaternion rotation, Vector3 position, Vector3 axis, float size, bool cutoffPlane, float snap)
AnalogJoystickSlider(Vector3 position, Vector3 direction)
AnalogJoystickSlider(Vector3 position, Vector3 direction, float size, Handles.CapFunction capFunction)