mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-04-11 23:19:00 +08:00
Support folder icon
(cherry picked from commit 0812551dcad3e7fadf174fd66a61358ffb5e62d5)
This commit is contained in:
parent
7bf3136e00
commit
69d18b854a
@ -64,6 +64,9 @@ namespace nadena.dev.modular_avatar.core.editor {
|
||||
SerializedProperty folderNameProperty = this.serializedObject.FindProperty(nameof(ModularAvatarMenuFolderCreator.folderName));
|
||||
EditorGUILayout.PropertyField(folderNameProperty, new GUIContent("Folder Name"));
|
||||
|
||||
SerializedProperty iconProperty = this.serializedObject.FindProperty(nameof(ModularAvatarMenuFolderCreator.icon));
|
||||
EditorGUILayout.PropertyField(iconProperty, new GUIContent("Folder Icon"));
|
||||
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
Localization.ShowLanguageUI();
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ namespace nadena.dev.modular_avatar.core.editor {
|
||||
this._creatFolders[rootCreator] = folderMenu;
|
||||
}
|
||||
|
||||
AddSubMenuElement(targetMenu, rootCreator.folderName, folderMenu); // TODO: Support Custom Icon
|
||||
AddSubMenuElement(targetMenu, rootCreator.folderName, folderMenu, rootCreator.icon);
|
||||
if (!this._childMap.TryGetValue(rootCreator, out List<ModularAvatarMenuFolderCreator> children)) continue;
|
||||
foreach (ModularAvatarMenuFolderCreator child in children) {
|
||||
this.CreateChildFolder(child);
|
||||
@ -81,7 +81,7 @@ namespace nadena.dev.modular_avatar.core.editor {
|
||||
this._creatFolders[creator] = folderMenu;
|
||||
}
|
||||
|
||||
AddSubMenuElement(targetMenu, creator.folderName, folderMenu); // TODO: Support Custom Icon
|
||||
AddSubMenuElement(targetMenu, creator.folderName, folderMenu, creator.icon);
|
||||
if (!this._childMap.TryGetValue(creator, out List<ModularAvatarMenuFolderCreator> children)) return;
|
||||
foreach (ModularAvatarMenuFolderCreator child in children) {
|
||||
this.CreateChildFolder(child);
|
||||
|
@ -8,6 +8,7 @@ namespace nadena.dev.modular_avatar.core {
|
||||
public VRCExpressionsMenu installTargetMenu;
|
||||
public ModularAvatarMenuFolderCreator installTargetFolderCreator;
|
||||
public string folderName;
|
||||
public Texture2D icon;
|
||||
|
||||
|
||||
public enum InstallTargetType {
|
||||
|
Loading…
x
Reference in New Issue
Block a user