예제 #1
0
        internal static void OnMouseLostFocus(Widget widget, FocusEventArg arg)
        {
            Instance root_inst   = arg.focus_widget_root;
            Instance widget_inst = arg.focus_widget;
            Layout   layout      = null;

            if (GUI.SearchLayout(root_inst, out layout))
            {
                Widget widget2 = null;
                if (layout.TryGetWidget(widget_inst, out widget2))
                {
                    widget.mHandleMouseLostFocus(widget.Name, layout.Name, widget2.Name);
                    return;
                }
                else if (widget_inst.IsValid)
                {
                    String name = Widget.GetName(widget_inst.Ptr);
                    if (name.Length > 0)//[2012/6/17 zhongdaohuan]暂不支持编辑匿名的ui控件
                    {
                        widget2 = Widget.CreateWidget(widget_inst, name, layout);
                        widget.mHandleMouseLostFocus(widget.Name, layout.Name, widget2.Name);
                        return;
                    }
                }
            }
            widget.mHandleMouseLostFocus(widget.Name, null, null);
        }