public VCEUIColorPickWnd ShowColorPickWindow(Transform parent, Vector3 localPos, Color color) { GameObject wnd = GameObject.Instantiate(m_ColorPickWindowRes) as GameObject; wnd.transform.parent = parent; wnd.transform.localScale = Vector3.one; wnd.transform.localPosition = localPos; wnd.name = m_ColorPickWindowRes.name; VCEUIColorPickWnd wndcomp = wnd.GetComponent <VCEUIColorPickWnd>(); wndcomp.m_ColorPick.FinalColor = color; wndcomp.m_ColorPick.UpdateUI(); wnd.SetActive(true); return(wndcomp); }
public void OnBGColorClick() { m_PopupColorWnd = VCEditor.Instance.m_UI.ShowColorPickWindow(m_ColorWndParent, m_ColorWndPos, m_ColorRect.color); }
void OnEmsvColorClick() { m_EmsvColorWnd = VCEditor.Instance.m_UI.ShowColorPickWindow(m_ColorWndParent, new Vector3(405, 0, 0), m_EmsvColorUI.color); }