示例#1
0
 // Displays the modal window with the texts for the corresponding choice
 void ShowModal(PauseMenuChoice choice)
 {
     modal.SetActive(true);
     SetPositions();
     modalTitle.UpdateText(choice.titleKey);
     modalBody.UpdateText(choice.dialogueKey);
     modalAccept.UpdateText(choice.acceptButtonKey);
     modalReject.UpdateText(choice.rejectButtonKey);
     modalIdentifier = choice.identifier.ToString();
 }
示例#2
0
 // Called when an item in the pause menu list is clicked
 public void OnMenuItemClick(PauseMenuChoice choice)
 {
     if (choice.identifier == PauseMenuChoice.Identifiers.resume)
     {
         modal.SetActive(false);
         TogglePause();
     }
     else
     {
         ShowModal(choice);
     }
 }