public void Show(bool show) { bool mouseOnLeft = Input.mousePosition.x < (m_ShowOnRight ? Screen.width / 5 * 3 : Screen.width / 5 * 2); if (!m_ShowOnRight && mouseOnLeft) { Vector3 position = m_Layout.transform.position; position.x = Screen.width - m_Layout.transform.Find("Background").transform.position.x *2; m_Layout.transform.position = position; m_ShowOnRight = true; m_Layout.SetModify(true, false); } else if (m_ShowOnRight && !mouseOnLeft) { m_Layout.transform.position = new Vector3(0, m_Layout.transform.position.y, m_Layout.transform.position.z); m_ShowOnRight = false; m_Layout.SetModify(true, false); } m_Layout.Show(show); }
void WidgetsModify() { m_SelectionBackground.SetModify(); m_SelectionArrow.SetModify(); m_BackgroundLayout.SetModify(true); }