public void Show(CUIEvent uievent) { if (this.form == null) { return; } if (!this.bIsSPModel) { for (int i = 0; i < this.signalEntities.Count; i++) { MiniMapSignalPanel.SignalEntity signalEntity = this.signalEntities[i]; if (signalEntity != null) { signalEntity.ShowSelected(false); } } } Vector2 pressPosition = uievent.m_pointerEventData.get_pressPosition(); this.cacheClickX = pressPosition.x; this.cacheClickY = pressPosition.y; Vector3 position = CUIUtility.ScreenToWorldPoint(this.form.GetCamera(), pressPosition, this.form.transform.position.z); this.node.transform.position = position; this.node.CustomSetActive(true); this.bIsSPModel = true; }
public void OnDrag(CUIEvent uievent) { if (this.form == null) { return; } Vector2 position = uievent.m_pointerEventData.get_position(); for (int i = 0; i < this.signalEntities.Count; i++) { MiniMapSignalPanel.SignalEntity signalEntity = this.signalEntities[i]; if (signalEntity != null) { signalEntity.ShowSelected(signalEntity.IsInsideRect(this.form, signalEntity.area, ref position)); } } }