Пример #1
0
        public void OnSnapSet()
        {
            int  snap    = 0;
            bool success = int.TryParse(inputField.text, out snap);

            if (success)
            {
                if (HorizontalSnapSelector.elements.Contains("1/" + snap))
                {
                    return;
                }

                Timeline.instance.SetSnap(snap);
                AdjustSnapArray(snap);
                mode = SnapEditorMode.subtractMode;
                SetConfirmButtonInfo();
                PresetScrollWindow.UpdateSnapList();
            }
            else
            {
                ColorBlock colors = inputField.colors;
                colors.normalColor = ErrorColor;
                inputField.colors  = colors;
            }
        }
Пример #2
0
        public void DeleteItem()
        {
            SnapPresetScrollWindow panel = GameObject.FindObjectOfType <SnapPresetScrollWindow>();

            panel.snapMenu.RemoveSnap(snapValue);
            panel.UpdateSnapList();
        }