示例#1
0
        protected void UI_Float(string name, ref float v,
                                System.Action <SWBaseInfo, bool> act = null, bool before = false, bool flexible = true, bool isRightUp = false)
        {
            if (isRightUp)
            {
                GUILayout.BeginHorizontal();
            }
            var temp = SWEditorUI.FloatField(name, v, flexible);

            if (temp != v)
            {
                if (before)
                {
                    if (act != null)
                    {
                        act(info, true);
                    }
                }
                v = temp;
                if (!before)
                {
                    if (act != null)
                    {
                        act(info, true);
                    }
                }
            }
            if (isRightUp)
            {
                GUILayout.EndHorizontal();
            }
            //GUILayout.Space (SWGlobalSettings.UIGap);
        }