示例#1
0
    public void Start(WidgetGroup widgetGroup)
    {
        Point2d newMousePosition = GetMousePosition();

        m_rootWidgetGroup = widgetGroup;

        m_mousePosition.Set(newMousePosition.x, newMousePosition.y);
        m_mouseOverIWidget = m_rootWidgetGroup.FindChildIWidgetContainingPoint(m_mousePosition);
        m_mouseIsDragging  = false;
        m_mouseWasDown     = Input.GetMouseButton((int)eMouseButton.left);

        if (Debug.isDebugBuild)
        {
            DebugRegistry.SetToggle("ui.event.log", false);
        }
    }
示例#2
0
 public virtual void UpdateWorldPosition()
 {
     if (m_parentGroup != null)
     {
         m_worldPosition = m_parentGroup.WorldPosition.Offset(m_localPosition.x, m_localPosition.y);
     }
     else
     {
         m_worldPosition.Set(m_localPosition);
     }
 }
示例#3
0
    public virtual void UpdateWorldPosition()
    {
        if (m_parentWidgetGroup != null)
        {
            m_worldPosition = m_parentWidgetGroup.WorldPosition.Offset(m_localPosition.x, m_localPosition.y);
        }
        else
        {
            m_worldPosition.Set(m_localPosition.x, m_localPosition.y);
        }


        for (int childIndex = 0; childIndex < m_childWidgets.Count; childIndex++)
        {
            IWidget widget = m_childWidgets[childIndex];

            widget.UpdateWorldPosition();
        }
    }