Beispiel #1
0
        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();
            }));
        }
Beispiel #2
0
 private void btnOK_Click(object sender, EventArgs e)
 {
     AcceptAction?.Invoke();
 }
Beispiel #3
0
 /// <summary>
 /// Accepts this instance.
 /// </summary>
 public void Accept()
 {
     Close();
     AcceptAction?.Invoke();
 }