ScriptGUI.GUI.UIWindow.SetWindowChangeCoord C# (CSharp) Method

SetWindowChangeCoord() public static method

设置窗口位置大小改变事件操作
public static SetWindowChangeCoord ( ScriptGUI.FString layout_name, ScriptGUI.FString widget_name, Event func, EventControl control ) : ExecuteResult
layout_name ScriptGUI.FString 面板名称
widget_name ScriptGUI.FString 控件名称
func Event 窗口位置大小改变代理
control EventControl 窗口位置大小改变事件控制方式
return ExecuteResult
            public static ExecuteResult SetWindowChangeCoord(FString layout_name, FString widget_name, Event.SenderVoid func, EventControl control)
            {
                Window window = null;
                ExecuteResult ret = FindUI(layout_name, widget_name, out window);
                if (ExecuteResult.Success == ret)
                {

                    switch (control)
                    {
                        case EventControl.Add:
                            {
                                window.EventWindowChangeCoord += func;
                            }
                            break;
                        case EventControl.Remove:
                            {
                                window.EventWindowChangeCoord -= func;
                            }
                            break;
                    }
                }
                return ret;
            }