예제 #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)));
 }