fix: enable wordwrap for ESO error dialog (#584)

Closes: #576
This commit is contained in:
bd_ 2023-12-27 20:01:01 +09:00 committed by GitHub
parent a9a0fd648e
commit 4d3f49306e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,7 +73,10 @@ namespace nadena.dev.modular_avatar.core.editor
foreach (var message in messageGroups)
{
EditorGUILayout.Space(SeparatorSize);
EditorGUILayout.LabelField(message);
var style = new GUIStyle(EditorStyles.label);
style.wordWrap = true;
EditorGUILayout.LabelField(message, style);
}
EditorGUILayout.BeginHorizontal();
@ -256,11 +259,11 @@ namespace nadena.dev.modular_avatar.core.editor
static bool ValidateSetupOutfit()
{
errorHeader = S("setup_outfit.err.header.notarget");
errorMessageGroups = new string[] {S("setup_outfit.err.unknown")};
errorMessageGroups = new string[] { S("setup_outfit.err.unknown") };
if (Selection.objects.Length == 0)
{
errorMessageGroups = new string[] {S("setup_outfit.err.no_selection")};
errorMessageGroups = new string[] { S("setup_outfit.err.no_selection") };
return false;
}
@ -284,7 +287,7 @@ namespace nadena.dev.modular_avatar.core.editor
if (nearestAvatarTransform == null || nearestAvatarTransform == xform)
{
errorMessageGroups = new string[]
{S_f("setup_outfit.err.multiple_avatar_descriptors", xform.gameObject.name)};
{ S_f("setup_outfit.err.multiple_avatar_descriptors", xform.gameObject.name) };
return false;
}
@ -331,7 +334,9 @@ namespace nadena.dev.modular_avatar.core.editor
return false;
}
avatarHips = avatarAnimator.isHuman ? avatarAnimator.GetBoneTransform(HumanBodyBones.Hips)?.gameObject : null;
avatarHips = avatarAnimator.isHuman
? avatarAnimator.GetBoneTransform(HumanBodyBones.Hips)?.gameObject
: null;
if (avatarHips == null)
{
@ -345,7 +350,9 @@ namespace nadena.dev.modular_avatar.core.editor
var outfitAnimator = outfitRoot.GetComponent<Animator>();
if (outfitAnimator != null)
{
outfitHips = outfitAnimator.isHuman ? outfitAnimator.GetBoneTransform(HumanBodyBones.Hips)?.gameObject : null;
outfitHips = outfitAnimator.isHuman
? outfitAnimator.GetBoneTransform(HumanBodyBones.Hips)?.gameObject
: null;
}
var hipsCandidates = new List<string>();