rename Installer to TargetInstaller

This commit is contained in:
raiti-chan 2022-12-18 16:50:42 +09:00
parent 7219bfa9f3
commit 2c4012ab61

View File

@ -1,6 +1,5 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq; using System.Linq;
using NUnit.Framework; using NUnit.Framework;
using UnityEditor; using UnityEditor;
@ -23,10 +22,10 @@ namespace nadena.dev.modular_avatar.core.editor
set => _treeView.Avatar = value; set => _treeView.Avatar = value;
} }
public ModularAvatarMenuInstaller Installer public ModularAvatarMenuInstaller TargetInstaller
{ {
get => _treeView.Installer; get => _treeView.TargetInstaller;
set => _treeView.Installer = value; set => _treeView.TargetInstaller = value;
} }
public Action<VRCExpressionsMenu> OnMenuSelected = (menu) => { }; public Action<VRCExpressionsMenu> OnMenuSelected = (menu) => { };
@ -65,7 +64,7 @@ namespace nadena.dev.modular_avatar.core.editor
window.titleContent = new GUIContent("Select menu"); window.titleContent = new GUIContent("Select menu");
window.Avatar = Avatar; window.Avatar = Avatar;
window.Installer = Installer; window.TargetInstaller = Installer;
window.OnMenuSelected = OnSelect; window.OnMenuSelected = OnSelect;
window.Show(); window.Show();
@ -86,14 +85,14 @@ namespace nadena.dev.modular_avatar.core.editor
} }
} }
private ModularAvatarMenuInstaller _installer; private ModularAvatarMenuInstaller _targetInstaller;
public ModularAvatarMenuInstaller Installer public ModularAvatarMenuInstaller TargetInstaller
{ {
get => _installer; get => _targetInstaller;
set set
{ {
_installer = value; _targetInstaller = value;
Reload(); Reload();
} }
} }
@ -131,7 +130,7 @@ namespace nadena.dev.modular_avatar.core.editor
_menuTree.AvatarsMenuMapping(); _menuTree.AvatarsMenuMapping();
foreach (ModularAvatarMenuInstaller installer in Avatar.gameObject.GetComponentsInChildren<ModularAvatarMenuInstaller>(true)) foreach (ModularAvatarMenuInstaller installer in Avatar.gameObject.GetComponentsInChildren<ModularAvatarMenuInstaller>(true))
{ {
if (installer == Installer) continue; if (installer == TargetInstaller) continue;
_menuTree.MappingMenuInstaller(installer); _menuTree.MappingMenuInstaller(installer);
} }