public MarkerAnchorSelector(DraggableButton draggablePad, Func <bool> VREnableGetter) { AnchorPicker = new MarkerSpatialSelector(); m_DraggablePad = draggablePad; m_VREnableGetter = VREnableGetter; }
public void DragArrownd() { DraggableButton.Click(); Actions action = new Actions(this.Driver); action.DragAndDropToOffset(this.DraggableObject, 25, 88); action.Perform(); }
public GameObject FindButton(object dragObject) { foreach (GameObject gameObject in this.buttons) { DraggableButton component = gameObject.GetComponent <DraggableButton>(); if (component && component.DragObject == dragObject) { return(component.gameObject); } } return(null); }
public void SetSelection(object targetObject) { foreach (GameObject gameObject in this.buttons) { DraggableButton component = gameObject.GetComponent <DraggableButton>(); if (component && component.DragObject == targetObject) { this.Select(component, targetObject); component.Select(); } } }
protected override void OnInitializedButton(int slot, InventoryButton button) { button.GetComponentInChildren <DraggableButton>().OnDrop.AddListener((ev) => { DraggableButton dragged = ev.pointerDrag.GetComponent <DraggableButton>(); InventoryButton sourceButton = dragged.GetComponentInParent <InventoryButton>(); Connection.Instance.SendData(new ItemActionPacket(new ItemActionData() { sourceSlot = sourceButton.Slot, targetSlot = slot, action = ItemAction.MOVE, sourceContainer = sourceButton.ContainerId, targetContainer = button.ContainerId })); }); }
private void Start() { foreach (var item in GetComponentsInChildren <DraggableButton>()) { item.OnDrop.AddListener((ev) => { SkillBarSlot slot = item.GetComponentInParent <SkillBarSlot>(); DraggableButton dragged = ev.pointerDrag.GetComponent <DraggableButton>(); slot.Fill(dragged.GetComponentInParent <SkillButton>().skillId); }); } slots = GetComponentsInChildren <SkillBarSlot>().ToList(); for (int i = 0; i < slots.Count; i++) { slots[i].SetHotkey((i + 1).ToString()); } }