public static void Initialize() { Page = ExpansionKitApi.CreateCustomFullMenuPopup(LayoutDescription.WideSlimList); Page.AddLabel("Title", new Action <GameObject>((obj) => { titleObject = obj; })); Page.AddLabel("Waiting for key...", new Action <GameObject>((obj) => { textObject = obj; })); Page.AddSimpleButton("Clear", new Action(() => { selectedKeys.Clear(); })); Page.AddSimpleButton("Accept", new Action(() => { AcceptAction?.Invoke(selectedKeys); fetchingKeys = false; Page.Hide(); })); Page.AddSimpleButton("Cancel", new Action(() => { CancelAction?.Invoke(); fetchingKeys = false; Page.Hide(); })); }
private void btnOK_Click(object sender, EventArgs e) { AcceptAction?.Invoke(); }
/// <summary> /// Accepts this instance. /// </summary> public void Accept() { Close(); AcceptAction?.Invoke(); }