public void ShowRunSlots() { for (int i = 0; i < runDates.Length; i++) { var cur = runDates[i]; slots[i].color = Colors.greyColor; if (cur == "") { slots[i].text = "Empty slot"; slots[i].GetComponent <Button>().enabled = false; } else { string finishStatus; if (vM.GetRunsFinishedState()[i] == true) { finishStatus = " - finished"; } else { finishStatus = " - ongoing"; } slots[i].text = cur + " - " + vM.GetBadHabitNameFromRun(i) + finishStatus; Debug.Log("index of req run = " + i); Debug.Log(PlayerPrefs.GetString("badHabitName0", "default")); } } loadButton.color = Colors.greyColor; loadButton.GetComponent <Button>().enabled = false; pM.EnablePopup(runTablePopup); }
//if the answer is fail, opens the popup the first time to check if the answer was correctly input, then loads the next scene public void CheckAndLoadScene() { if (counter == 0) { if (weeklyCheck == OptionCodes.options[1]) { pM.EnablePopup(popupCheck); counter++; return; } } //saves values and loads the next scene SaveValuesAndLoad(); }
//if the answer is no on habit, opens the popup the first time to check if the answer was correctly input, then loads the next scene public void CheckAndLoadScene() { if (counter == 0) { foreach (string el in arrayOfChanged) { if (el == OptionCodes.options[1]) { pM.EnablePopup(popupCheck); counter++; return; } } } //saves values and loads the next scene SaveValuesAndLoad(); }
public void CalendarRestrictionPopup() { pM.EnablePopup(calendarRestrictionPopup); }