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; } }
public void DeleteItem() { SnapPresetScrollWindow panel = GameObject.FindObjectOfType <SnapPresetScrollWindow>(); panel.snapMenu.RemoveSnap(snapValue); panel.UpdateSnapList(); }