using System; using BansheeEngine; namespace BansheeEditor { /// /// Controls when a gizmo is displayed and whether it can be interacted with. These flags can be combined to achieve /// different effect. /// public enum DrawGizmoFlags // Note: Must match the C++ enum DrawGizmoFlags { /// Gizmo is only displayed when its scene object is selected. Selected = 0x01, /// Gizmo is only displayed when its parent scene object is selected. ParentSelected = 0x02, /// Gizmo is only displayed when its scene object is not selected. NotSelected = 0x04, /// Gizmo can be clicked on (selected). Pickable = 0x08 } /// /// Notifies the runtime that the method this attribute is specified on serves for gizmo drawing. All drawing in the /// method should be done using the class. The method must be static and must accept a single /// parameter of type deriving from . Type of the parameter determines for which objects will /// the gizmo be drawn for. /// [AttributeUsage(AttributeTargets.Method)] public sealed class DrawGizmo : Attribute { private DrawGizmoFlags flags; /// /// Creates a new draw gizmos attribute. /// /// Flags that control how and when the gizmos is drawn. public DrawGizmo(DrawGizmoFlags flags) { this.flags = flags; } } }