/// <summary> /// Sets this. /// </summary> /// <param name="name">The name of this.</param> /// <param name="onNameChanged">The first string representing the new name and the second one the old one.</param> /// <param name="onRemove">On removing this.</param> public void Set(string name, System.Action <string, string, PlayerInterface> onNameChanged, System.Action <string> onRemove) { this.SetName(name); this.onNameChanged = onNameChanged; this.onRemove = onRemove; this.nameInputButton.onClick.AddListener(delegate { InputScreen.Create().Set("What is the Name of this Player?", 2, 14, true, OnNameChanged, lineType: InputField.LineType.SingleLine, startValue: "", contentType: InputField.ContentType.Name, promptText: "Enter Name"); }); this.removeButton.onClick.AddListener(OnRemove); }
public void PromptChangeQuestion(QuestionEditInterface questionEditInterface) { if (questionEditInterface == null) { Debug.LogError(this.GetType().FullName + ": Null interface."); return; } string startValue = string.Equals(questionEditInterface.Question.value, QuestionManager.emptyQuestion) ? "" : questionEditInterface.Question.value; InputScreen.Create().Set("Change question: ", 3, 140, true, (newValue) => { OnChangeQuestion(questionEditInterface, newValue); }, startValue: startValue); }
private void PromptNameChange() { InputScreen.Create().Set("New Set Name?", 2, 15, true, callbackConfirm: OnSetNameChanged, lineType: InputField.LineType.SingleLine, startValue: currSet.GetDisplayName()); }