private void HandleInput(GameObject source) { string name = source.name; if (delete) { switch (name) { case "DeleteSelected": foreach (string toDelete in deleteList.Keys) { GameObject deleteObj = deleteList[toDelete]; loader.DeleteSave(toDelete); saves.Remove(toDelete); selectPanel.RemoveAction(deleteObj.GetComponent <FlexActionableComponent>()); } scroll.deleteObjects(deleteList.Values.Select(x => x.transform).ToList()); goto case "delete"; case "delete": deleteList.Clear(); selectPanel.SwitchToSingleSelect(); selectPanel.ChangeHoveringColor(colorSettings.selectHoverColor); selectPanel.ChangeSelectedColor(colorSettings.selectColor); delete = false; break; default: if (deleteList.ContainsKey(name)) { deleteList.Remove(name); } else { deleteList.Add(name, source); } break; } } else { switch (name) { case "delete": selectPanel.SwitchToMultiSelect(); selectPanel.ChangeHoveringColor(colorSettings.deleteHoverColor); selectPanel.ChangeSelectedColor(colorSettings.deleteColor); delete = true; break; default: List <ExpressionSet> ess = saves[name].expressionSetSet; calcManager.LoadSavedExpressionSets(ess); break; } } }
private void HandleInput(GameObject source) { string name = source.name; if (delete) { switch (name) { case "DeleteSelected": foreach (string toDelete in selectPanel.selected.Keys) { GameObject deleteObj = selectPanel.selected[toDelete]; loader.DeleteSave(toDelete); saves.Remove(toDelete); selectPanel.RemoveAction(deleteObj.GetComponent <FlexActionableComponent>()); } scroll.deleteObjects(selectPanel.selected.Values.Select(x => x.transform).ToList()); goto case "delete"; case "delete": delete = false; selectPanel.hoverUnselectedColor = QuickButton.LIGHT_HOVERING; selectPanel.hoverSelectedColor = colorSettings.selectHoverColor; selectPanel.selectedSelectedColor = colorSettings.selectColor; selectPanel.selectedUnselectedColor = colorSettings.selectColor; selectPanel.ChangeHoveringColor(QuickButton.LIGHT_HOVERING); selectPanel.ChangeSelectedColor(colorSettings.selectColor); selectPanel.SwitchToSingleSelect(); break; } } else { switch (name) { case "delete": delete = true; selectPanel.hoverUnselectedColor = colorSettings.deleteHoverColor; selectPanel.hoverSelectedColor = colorSettings.deleteColor; selectPanel.selectedSelectedColor = colorSettings.deleteColor; selectPanel.selectedUnselectedColor = colorSettings.deleteColor; selectPanel.ChangeHoveringColor(colorSettings.deleteHoverColor); selectPanel.ChangeSelectedColor(colorSettings.deleteColor); selectPanel.SwitchToMultiSelect(); break; default: List <ExpressionSet> ess = saves[name].expressionSetSet; calcManager.LoadSavedExpressionSets(ess); break; } } // @stats // save load panel Calcflow.UserStatistics.StatisticsTracking.InstantEvent("Save Load", source.name, new Dictionary <string, object>() { { "Deletion", delete } }); }