Пример #1
0
        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();
            }
        }
Пример #2
0
 static void TestQuantityModal()
 {
     Modal.PushQuantityModal("QtyTest", -1, 100, 1, false, "qty_test", TestQuantityModalCallback);
 }
Пример #3
0
 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);
 }
Пример #4
0
 static void TestMessageModal(string text, string heading, string tag)
 {
     Modal.PushMessageModal(text, heading, tag, TestMessageModalCallback);
 }