您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
35 行
1.4 KiB
35 行
1.4 KiB
using UnityEngine;
|
|
|
|
namespace Unity.Animations.SpringBones
|
|
{
|
|
public static class SpringBoneGUIStyles
|
|
{
|
|
public static GUIStyle LabelStyle { get; private set; }
|
|
public static GUIStyle HeaderLabelStyle { get; private set; }
|
|
public static GUIStyle ButtonStyle { get; private set; }
|
|
public static GUIStyle MiddleLeftJustifiedLabelStyle { get; private set; }
|
|
public static GUIStyle ToggleStyle { get; private set; }
|
|
|
|
public static void ReacquireStyles()
|
|
{
|
|
if (LabelStyle == null)
|
|
{
|
|
LabelStyle = new GUIStyle(GUI.skin.label);
|
|
HeaderLabelStyle = new GUIStyle(UnityEditor.EditorStyles.boldLabel);
|
|
ButtonStyle = new GUIStyle(GUI.skin.button);
|
|
MiddleLeftJustifiedLabelStyle = new GUIStyle(GUI.skin.label);
|
|
ToggleStyle = new GUIStyle(GUI.skin.toggle);
|
|
}
|
|
|
|
const int FontSize = 14;
|
|
LabelStyle.fontSize = FontSize;
|
|
HeaderLabelStyle.fontSize = FontSize;
|
|
ButtonStyle.fontSize = FontSize;
|
|
MiddleLeftJustifiedLabelStyle.fontSize = FontSize;
|
|
ToggleStyle.fontSize = FontSize;
|
|
|
|
HeaderLabelStyle.alignment = TextAnchor.MiddleCenter;
|
|
MiddleLeftJustifiedLabelStyle.alignment = TextAnchor.MiddleLeft;
|
|
}
|
|
}
|
|
}
|