ScriptGUI.GUI.UIScrollBar.SetEventScrollChangePosition C# (CSharp) Method

SetEventScrollChangePosition() public static method

设置指定面板控件的滚动事件操作
public static SetEventScrollChangePosition ( 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 SetEventScrollChangePosition(FString layout_name, FString widget_name, Event.SenderInt func, EventControl control)
            {
                ScrollBar sb = null;
                ExecuteResult ret = FindUI(layout_name, widget_name, out sb);
                if (ExecuteResult.Success == ret)
                {

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