示例#1
0
    public static IconPickerDialog Launch(OnIconPickerResult callback)
    {
        GameObject       obj    = GameObject.Instantiate(Resources.Load <GameObject>(PREFAB_PATH));
        IconPickerDialog dialog = obj.GetComponent <IconPickerDialog>();

        dialog.Setup(callback);
        return(dialog);
    }
示例#2
0
 private void OnEditIconButtonClicked()
 {
     IconPickerDialog.Launch(pickedIcon =>
     {
         if (pickedIcon == null)
         {
             return;
         }
         card.SetImagePath("icon:" + pickedIcon);
         onChangesToCommit?.Invoke();
         ReloadCardImage();
     });
 }
示例#3
0
 static void CommandDebugIconPicker(CommandArg[] args)
 {
     IconPickerDialog.Launch(result => HeadlessTerminal.Log("Icon picker result: " + (result == null ? "null" : result)));
 }