public void OnClickActualSave() { if (!GameState.Instance.SaveLocked) { if (!string.IsNullOrEmpty(SaveInputField.text)) { BaseSceneController.Current.Commit(); GameState.SerializeToFile(CoreParams.SavePath + @"\" + SaveInputField.text + ".json"); Modal.PushMessageModal("", "Saved Successfully", null, null); } else { Modal.PushMessageModal("You need to enter a filename!", "Save Failed", null, null); } } else { //can't save! HidePanels(); } }
static void TestQuantityModal() { Modal.PushQuantityModal("QtyTest", -1, 100, 1, false, "qty_test", TestQuantityModalCallback); }
static void TestConfirmModal() { Modal.PushConfirmModal("If a tree falls in the forest and nobody is around to hear it, does it make a sound?", "ConfirmModalTest", "Yes", "No", "not a tag", TestConfirmModalCallback); }
static void TestMessageModal(string text, string heading, string tag) { Modal.PushMessageModal(text, heading, tag, TestMessageModalCallback); }