GizmoControlsclass

Extendable helper to create common gizmos

objectGizmoControls
Namespace
global
Assembly
Sandbox.Engine
Declaration
public sealed class Sandbox.Gizmo.GizmoControls

Methods15

Showing 15 methods

public bool Arrow(string name, Vector3 axis, float distance, float length = 24, float girth = 6, float axisOffset = 2, float cullAngle = 10, float snapSize = 0, string head = cone)PUBLIC

Draw an arrow - return move delta if interacted with

ParameterTypeDescription
namestring
axisVector3
distancefloat
length = 24float
girth = 6float
axisOffset = 2float
cullAngle = 10float
snapSize = 0float
head = conestring
Returns:bool

public bool DragSquare(string name, Vector2 size, Rotation rotation, Vector3 movement, System.Action drawHandle = null)PUBLIC

Manipulate a 2d value by moving on 2 axis

ParameterTypeDescription
namestring
sizeVector2
rotationRotation
movementVector3
drawHandle = nullAction
Returns:bool

public bool Position(string name, Vector3 position, Vector3 newPos, System.Nullable`1<Rotation> axisRotation = null, float squareSize = 3)PUBLIC

ParameterTypeDescription
namestring
positionVector3
newPosVector3
axisRotation = nullNullable<Rotation>
squareSize = 3float
Returns:bool

public static System.IDisposable PushFixedScale(System.Nullable`1<float> scale = null)PUBLICSTATIC

ParameterTypeDescription
scale = nullNullable<float>
Returns:IDisposable

public bool RotateSingle(string name, Color color, float angleDelta, float size = 19, bool useHalfCircle = True)PUBLIC

A single rotation axis

ParameterTypeDescription
namestring
colorColor
angleDeltafloat
size = 19float
useHalfCircle = Truebool
Returns:bool

public bool Sphere(string name, float radius, float outRadius, Color color)PUBLIC

A scalable sphere gizmo. Returns true if the gizmo was interacted with and outValue will return the new radius.

ParameterTypeDescription
namestring
radiusfloat
outRadiusfloat
colorColor
Returns:bool

On this page

Methodspublic System.Boolean Arrow(System.String name, Vector3 axis, System.Single distance, System.Single length = 24, System.Single girth = 6, System.Single axisOffset = 2, System.Single cullAngle = 10, System.Single snapSize = 0, System.String head = cone)public System.Boolean BoundingBox(System.String name, BBox value, BBox outValue, System.Boolean outPressed, Vector3 outResizeAxis)public System.Boolean BoundingBox(System.String name, BBox value, BBox outValue, System.Boolean outPressed)public System.Boolean BoundingBox(System.String name, BBox value, BBox outValue)public System.Boolean Capsule(System.String name, Capsule capsule, Capsule outCapsule, Color color)public System.Boolean DragBox(System.String name, Vector3 size, Rotation rotation, Vector3 movement)public System.Boolean DragSquare(System.String name, Vector2 size, Rotation rotation, Vector3 movement, System.Action drawHandle = null)public System.Boolean Position(System.String name, Vector3 position, Vector3 newPos, System.Nullable`1<Rotation> axisRotation = null, System.Single squareSize = 3)public static System.IDisposable PushFixedScale(System.Nullable`1<System.Single> scale = null)public System.Boolean Rotate(System.String name, Angles outValue)public System.Boolean Rotate(System.String name, Rotation value, Rotation newValue)public System.Boolean RotateSingle(System.String name, Color color, System.Single angleDelta, System.Single size = 19, System.Boolean useHalfCircle = True)public System.Boolean Scale(System.String name, System.Single value, System.Single outValue)public System.Boolean Scale(System.String name, Vector3 value, Vector3 outValue, System.Nullable`1<Rotation> axisRotation = null, System.Single squareSize = 3)public System.Boolean Sphere(System.String name, System.Single radius, System.Single outRadius, Color color)Metadata