|
|
@@ -52,28 +52,6 @@ public class ModalPanel : MonoBehaviour {
|
|
|
return modalPanel;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- // // Announcement with Image: A string, a Sprite and Cancel event;
|
|
|
- // public void Choice (string question, UnityAction cancelEvent, Sprite iconImage = null) {
|
|
|
- // modalPanelObject.SetActive (true);
|
|
|
- //
|
|
|
- // button3.onClick.RemoveAllListeners();
|
|
|
- // button3.onClick.AddListener (cancelEvent);
|
|
|
- // button3.onClick.AddListener (ClosePanel);
|
|
|
- //
|
|
|
- // this.question.text = question;
|
|
|
- // if (iconImage)
|
|
|
- // this.iconImage.sprite = iconImage;
|
|
|
- //
|
|
|
- // if (iconImage)
|
|
|
- // this.iconImage.gameObject.SetActive(true);
|
|
|
- // else
|
|
|
- // this.iconImage.gameObject.SetActive(false);
|
|
|
- // button1.gameObject.SetActive(false);
|
|
|
- // button2.gameObject.SetActive(false);
|
|
|
- // button3.gameObject.SetActive(true);
|
|
|
- // }
|
|
|
-
|
|
|
public void NewChoice(ModalPanelDetails details) {
|
|
|
modalPanelObject.SetActive(true);
|
|
|
|
|
|
@@ -112,96 +90,6 @@ public class ModalPanel : MonoBehaviour {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // // Yes/No: A string, a Yes event, a No event (No Cancel Button);
|
|
|
- // public void Choice (string question, UnityAction yesEvent, UnityAction noEvent) {
|
|
|
- // modalPanelObject.SetActive (true);
|
|
|
- //
|
|
|
- // button1.onClick.RemoveAllListeners();
|
|
|
- // button1.onClick.AddListener (yesEvent);
|
|
|
- // button1.onClick.AddListener (ClosePanel);
|
|
|
- //
|
|
|
- // button2.onClick.RemoveAllListeners();
|
|
|
- // button2.onClick.AddListener (noEvent);
|
|
|
- // button2.onClick.AddListener (ClosePanel);
|
|
|
- //
|
|
|
- // this.question.text = question;
|
|
|
- //
|
|
|
- // this.iconImage.gameObject.SetActive(false);
|
|
|
- // button1.gameObject.SetActive(true);
|
|
|
- // button2.gameObject.SetActive(true);
|
|
|
- // button3.gameObject.SetActive(false);
|
|
|
- // }
|
|
|
- //
|
|
|
- // // Yes/No/Cancel: A string, a Yes event, a No event and Cancel event;
|
|
|
- // public void Choice (string question, UnityAction yesEvent, UnityAction noEvent, UnityAction cancelEvent) {
|
|
|
- // modalPanelObject.SetActive (true);
|
|
|
- //
|
|
|
- // button1.onClick.RemoveAllListeners();
|
|
|
- // button1.onClick.AddListener (yesEvent);
|
|
|
- // button1.onClick.AddListener (ClosePanel);
|
|
|
- //
|
|
|
- // button2.onClick.RemoveAllListeners();
|
|
|
- // button2.onClick.AddListener (noEvent);
|
|
|
- // button2.onClick.AddListener (ClosePanel);
|
|
|
- //
|
|
|
- // button3.onClick.RemoveAllListeners();
|
|
|
- // button3.onClick.AddListener (cancelEvent);
|
|
|
- // button3.onClick.AddListener (ClosePanel);
|
|
|
- //
|
|
|
- // this.question.text = question;
|
|
|
- //
|
|
|
- // this.iconImage.gameObject.SetActive(false);
|
|
|
- // button1.gameObject.SetActive(true);
|
|
|
- // button2.gameObject.SetActive(true);
|
|
|
- // button3.gameObject.SetActive(true);
|
|
|
- // }
|
|
|
- //
|
|
|
- // // Yes/No with Image: A string, a Sprite, a Yes event, a No event (No Cancel Button);
|
|
|
- // public void Choice (string question, Sprite iconImage, UnityAction yesEvent, UnityAction noEvent) {
|
|
|
- // modalPanelObject.SetActive (true);
|
|
|
- //
|
|
|
- // button1.onClick.RemoveAllListeners();
|
|
|
- // button1.onClick.AddListener (yesEvent);
|
|
|
- // button1.onClick.AddListener (ClosePanel);
|
|
|
- //
|
|
|
- // button2.onClick.RemoveAllListeners();
|
|
|
- // button2.onClick.AddListener (noEvent);
|
|
|
- // button2.onClick.AddListener (ClosePanel);
|
|
|
- //
|
|
|
- // this.question.text = question;
|
|
|
- // this.iconImage.sprite = iconImage;
|
|
|
- //
|
|
|
- // this.iconImage.gameObject.SetActive(true);
|
|
|
- // button1.gameObject.SetActive(true);
|
|
|
- // button2.gameObject.SetActive(true);
|
|
|
- // button3.gameObject.SetActive(false);
|
|
|
- // }
|
|
|
- //
|
|
|
- // // Yes/No/Cancel with Image: A string, a Sprite, a Yes event, a No event and Cancel event;
|
|
|
- // public void Choice (string question, Sprite iconImage, UnityAction yesEvent, UnityAction noEvent, UnityAction cancelEvent) {
|
|
|
- // modalPanelObject.SetActive (true);
|
|
|
- //
|
|
|
- // button1.onClick.RemoveAllListeners();
|
|
|
- // button1.onClick.AddListener (yesEvent);
|
|
|
- // button1.onClick.AddListener (ClosePanel);
|
|
|
- //
|
|
|
- // button2.onClick.RemoveAllListeners();
|
|
|
- // button2.onClick.AddListener (noEvent);
|
|
|
- // button2.onClick.AddListener (ClosePanel);
|
|
|
- //
|
|
|
- // button3.onClick.RemoveAllListeners();
|
|
|
- // button3.onClick.AddListener (cancelEvent);
|
|
|
- // button3.onClick.AddListener (ClosePanel);
|
|
|
- //
|
|
|
- // this.question.text = question;
|
|
|
- // this.iconImage.sprite = iconImage;
|
|
|
- //
|
|
|
- // this.iconImage.gameObject.SetActive(true);
|
|
|
- // button1.gameObject.SetActive(true);
|
|
|
- // button2.gameObject.SetActive(true);
|
|
|
- // button3.gameObject.SetActive(true);
|
|
|
- // }
|
|
|
-
|
|
|
void ClosePanel() {
|
|
|
modalPanelObject.SetActive(false);
|
|
|
}
|