public ObjectFieldIconBar(VisualElement parent) { Root = new VisualElement(); Root.style.alignSelf = Align.FlexEnd; Root.style.flexDirection = FlexDirection.Row; SceneHandleSelection = new ObjectFieldSelectionIcon(Root, "G"); Add(Root); style.marginLeft = 5f; parent.Add(this); }
public InterativeObjectInitializerLine(VisualElement parent, GameObject GameObject, Action <InterativeObjectInitializerLine> OnClickedExtern) { this.GameObjectReference = GameObject; this.OnClickedExtern = OnClickedExtern; this.IsSelected = new BoolVariable(false, this.OnSelected, this.OnUnSelected); this.style.flexDirection = FlexDirection.Row; this.GizmoIcon = new ObjectFieldSelectionIcon(this, "G"); this.Label = new Label(GameObject.name); this.Add(this.Label); parent.Add(this); this.RegisterCallback <MouseEnterEvent>(this.OnMouseEnter); this.RegisterCallback <MouseOutEvent>(this.OnMouseExit); this.RegisterCallback <MouseDownEvent>(this.OnMouseDown); }