| | |
| | | return a < b ? -1 : 1; |
| | | } |
| | | |
| | | public FunctionButton AddFunction(int order, int functionId, string title, int redpointId) |
| | | public FunctionButton AddFunction(string pattern, int order, int functionId, string title, int redpointId) |
| | | { |
| | | if (m_Container == null) |
| | | { |
| | | return null; |
| | | } |
| | | |
| | | var instance = UIUtility.CreateWidget("FunctionButton", string.Concat("Function_", order)); |
| | | var instance = UIUtility.CreateWidget(pattern, string.Concat("Function_", order)); |
| | | instance.transform.SetParentEx(this.m_Container, Vector3.zero, Quaternion.identity, Vector3.one); |
| | | |
| | | var functionButton = instance.GetComponent<FunctionButton>(); |
| | | functionButton.functionId = functionId; |
| | | functionButton.order = order; |