// Init //------------------------------------------- public apGUIStyleWrapper() { _isInitialized = false; s_instance = this; }
public void Init() { if (_isInitialized) { return; } //하나씩 생성하자 _gs_None = new GUIStyle(GUIStyle.none); _gs_None_LabelColor = new GUIStyle(GUIStyle.none); _gs_None_LabelColor.normal.textColor = GUI.skin.label.normal.textColor; _gs_None_White2Cyan = new GUIStyle(GUIStyle.none); _gs_None_White2Cyan.normal.textColor = !EditorGUIUtility.isProSkin ? Color.white : Color.cyan; _gs_None_Margin0_Padding0 = new GUIStyle(GUIStyle.none); _gs_None_Margin0_Padding0.margin = new RectOffset(0, 0, 0, 0); _gs_None_Margin0_Padding0.padding = new RectOffset(0, 0, 0, 0); _gs_None_MiddleLeft_LabelColor = new GUIStyle(GUIStyle.none); _gs_None_MiddleLeft_LabelColor.alignment = TextAnchor.MiddleLeft; _gs_None_MiddleLeft_LabelColor.normal.textColor = GUI.skin.label.normal.textColor; _gs_None_MiddleLeft_White2Cyan = new GUIStyle(GUIStyle.none); _gs_None_MiddleLeft_White2Cyan.alignment = TextAnchor.MiddleLeft; _gs_None_MiddleLeft_White2Cyan.normal.textColor = !EditorGUIUtility.isProSkin ? Color.white : Color.cyan; _gs_Label = new GUIStyle(GUI.skin.label); _gs_Label_MiddleCenter = new GUIStyle(GUI.skin.label); _gs_Label_MiddleCenter.alignment = TextAnchor.MiddleCenter; _gs_Label_MiddleCenter_Margin0 = new GUIStyle(GUI.skin.label); _gs_Label_MiddleCenter_Margin0.alignment = TextAnchor.MiddleCenter; _gs_Label_MiddleCenter_Margin0.margin = new RectOffset(0, 0, 0, 0); _gs_Label_GrayColor = new GUIStyle(GUI.skin.label); _gs_Label_GrayColor.normal.textColor = Color.gray; _gs_Label_RedColor = new GUIStyle(GUI.skin.label); _gs_Label_RedColor.normal.textColor = Color.red; _gs_Label_MiddleLeft = new GUIStyle(GUI.skin.label); _gs_Label_MiddleLeft.alignment = TextAnchor.MiddleLeft; _gs_Label_MiddleRight = new GUIStyle(GUI.skin.label); _gs_Label_MiddleRight.alignment = TextAnchor.MiddleRight; _gs_Label_MiddleLeft_BlackColor = new GUIStyle(GUI.skin.label); _gs_Label_MiddleLeft_BlackColor.alignment = TextAnchor.MiddleLeft; _gs_Label_MiddleLeft_BlackColor.normal.textColor = Color.black; _gs_Label_MiddleLeft_RedColor = new GUIStyle(GUI.skin.label); _gs_Label_MiddleLeft_RedColor.alignment = TextAnchor.MiddleLeft; _gs_Label_MiddleLeft_RedColor.normal.textColor = Color.red; _gs_Label_MiddleRight_BlackColor = new GUIStyle(GUI.skin.label); _gs_Label_MiddleRight_BlackColor.alignment = TextAnchor.MiddleRight; _gs_Label_MiddleRight_BlackColor.normal.textColor = Color.black; _gs_Label_MiddleRight_RedColor = new GUIStyle(GUI.skin.label); _gs_Label_MiddleRight_RedColor.alignment = TextAnchor.MiddleRight; _gs_Label_MiddleRight_RedColor.normal.textColor = Color.red; _gs_Label_BoxMargin = new GUIStyle(GUI.skin.label); _gs_Label_BoxMargin.margin = GUI.skin.box.margin; _gs_Label_LowerLeft_BoxTextColor = new GUIStyle(GUI.skin.label); _gs_Label_LowerLeft_BoxTextColor.alignment = TextAnchor.LowerLeft; _gs_Label_LowerLeft_BoxTextColor.normal.textColor = apEditorUtil.BoxTextColor; _gs_Label_LightBlueColor = new GUIStyle(GUI.skin.label); _gs_Label_LightBlueColor.normal.textColor = new Color(0.0f, 0.5f, 1.0f, 1.0f); _gs_Label_MiddleLeft_BtnPadding_BlackColor = new GUIStyle(GUI.skin.label); _gs_Label_MiddleLeft_BtnPadding_BlackColor.alignment = TextAnchor.MiddleLeft; _gs_Label_MiddleLeft_BtnPadding_BlackColor.padding = GUI.skin.button.padding; _gs_Label_MiddleLeft_BtnPadding_BlackColor.normal.textColor = Color.black; _gs_Label_MiddleLeft_BtnPadding_WhiteColor = new GUIStyle(GUI.skin.label); _gs_Label_MiddleLeft_BtnPadding_WhiteColor.alignment = TextAnchor.MiddleLeft; _gs_Label_MiddleLeft_BtnPadding_WhiteColor.padding = GUI.skin.button.padding; _gs_Label_MiddleLeft_BtnPadding_WhiteColor.normal.textColor = Color.white; _gs_Label_MiddleLeft_BtnPadding_GrayColor = new GUIStyle(GUI.skin.label); _gs_Label_MiddleLeft_BtnPadding_GrayColor.alignment = TextAnchor.MiddleLeft; _gs_Label_MiddleLeft_BtnPadding_GrayColor.padding = GUI.skin.button.padding; _gs_Label_MiddleLeft_BtnPadding_GrayColor.normal.textColor = new Color(0.5f, 0.5f, 0.5f, 1.0f); _gs_Label_MiddleLeft_BtnPadding_Left20_BlackColor = new GUIStyle(GUI.skin.label); _gs_Label_MiddleLeft_BtnPadding_Left20_BlackColor.alignment = TextAnchor.MiddleLeft; _gs_Label_MiddleLeft_BtnPadding_Left20_BlackColor.padding = GUI.skin.button.padding; _gs_Label_MiddleLeft_BtnPadding_Left20_BlackColor.padding.left += 20; _gs_Label_MiddleLeft_BtnPadding_Left20_BlackColor.normal.textColor = Color.black; _gs_Label_MiddleLeft_BtnPadding_Left20_WhiteColor = new GUIStyle(GUI.skin.label); _gs_Label_MiddleLeft_BtnPadding_Left20_WhiteColor.alignment = TextAnchor.MiddleLeft; _gs_Label_MiddleLeft_BtnPadding_Left20_WhiteColor.padding = GUI.skin.button.padding; _gs_Label_MiddleLeft_BtnPadding_Left20_WhiteColor.padding.left += 20; _gs_Label_MiddleLeft_BtnPadding_Left20_WhiteColor.normal.textColor = Color.white; _gs_Label_MiddleLeft_BtnPadding_Left20_GrayColor = new GUIStyle(GUI.skin.label); _gs_Label_MiddleLeft_BtnPadding_Left20_GrayColor.alignment = TextAnchor.MiddleLeft; _gs_Label_MiddleLeft_BtnPadding_Left20_GrayColor.padding = GUI.skin.button.padding; _gs_Label_MiddleLeft_BtnPadding_Left20_GrayColor.padding.left += 20; _gs_Label_MiddleLeft_BtnPadding_Left20_GrayColor.normal.textColor = new Color(0.5f, 0.5f, 0.5f, 1.0f); _gs_Button_LabelPadding = new GUIStyle(GUI.skin.button); _gs_Button_LabelPadding.padding = GUI.skin.label.padding; _gs_Button_MiddleCenter_BoxPadding = new GUIStyle(GUI.skin.button); _gs_Button_MiddleCenter_BoxPadding.alignment = TextAnchor.MiddleCenter; _gs_Button_MiddleCenter_BoxPadding.padding = GUI.skin.box.padding; _gs_Button_MiddleCenter_BoxPadding_White2Cyan = new GUIStyle(GUI.skin.button); _gs_Button_MiddleCenter_BoxPadding_White2Cyan.alignment = TextAnchor.MiddleCenter; _gs_Button_MiddleCenter_BoxPadding_White2Cyan.padding = GUI.skin.box.padding; _gs_Button_MiddleCenter_BoxPadding_White2Cyan.normal.textColor = !EditorGUIUtility.isProSkin ? Color.white : Color.cyan; _gs_Button_MiddleCenter_BoxPadding_White2Black = new GUIStyle(GUI.skin.button); _gs_Button_MiddleCenter_BoxPadding_White2Black.alignment = TextAnchor.MiddleCenter; _gs_Button_MiddleCenter_BoxPadding_White2Black.padding = GUI.skin.box.padding; _gs_Button_MiddleCenter_BoxPadding_White2Black.normal.textColor = !EditorGUIUtility.isProSkin ? Color.white : Color.black; _gs_Button_MiddleLeft_BoxPadding = new GUIStyle(GUI.skin.button); _gs_Button_MiddleLeft_BoxPadding.alignment = TextAnchor.MiddleLeft; _gs_Button_MiddleLeft_BoxPadding.padding = GUI.skin.box.padding; _gs_Button_MiddleLeft_BoxPadding_White2Cyan = new GUIStyle(GUI.skin.button); _gs_Button_MiddleLeft_BoxPadding_White2Cyan.alignment = TextAnchor.MiddleLeft; _gs_Button_MiddleLeft_BoxPadding_White2Cyan.padding = GUI.skin.box.padding; _gs_Button_MiddleLeft_BoxPadding_White2Cyan.normal.textColor = !EditorGUIUtility.isProSkin ? Color.white : Color.cyan; _gs_Button_MiddleLeft_BoxPadding_White2Black = new GUIStyle(GUI.skin.button); _gs_Button_MiddleLeft_BoxPadding_White2Black.alignment = TextAnchor.MiddleLeft; _gs_Button_MiddleLeft_BoxPadding_White2Black.padding = GUI.skin.box.padding; _gs_Button_MiddleLeft_BoxPadding_White2Black.normal.textColor = !EditorGUIUtility.isProSkin ? Color.white : Color.black; _gs_Button_TextFieldMargin = new GUIStyle(GUI.skin.button); _gs_Button_TextFieldMargin.margin = GUI.skin.textField.margin; _gs_Button_Margin0 = new GUIStyle(GUI.skin.button); _gs_Button_Margin0.padding = new RectOffset(0, 0, 0, 0); _gs_Box_Basic = new GUIStyle(GUI.skin.box); _gs_Box_MiddleCenter = new GUIStyle(GUI.skin.box); _gs_Box_MiddleCenter.alignment = TextAnchor.MiddleCenter; _gs_Box_LabelMargin_Padding0 = new GUIStyle(GUI.skin.box); _gs_Box_LabelMargin_Padding0.margin = GUI.skin.label.margin; _gs_Box_LabelMargin_Padding0.padding = new RectOffset(0, 0, 0, 0); _gs_Box_MiddleCenter_WhiteColor = new GUIStyle(GUI.skin.box); _gs_Box_MiddleCenter_WhiteColor.alignment = TextAnchor.MiddleCenter; _gs_Box_MiddleCenter_WhiteColor.normal.textColor = Color.white; _gs_Box_MiddleCenter_BtnMargin_White = new GUIStyle(GUI.skin.box); _gs_Box_MiddleCenter_BtnMargin_White.alignment = TextAnchor.MiddleCenter; _gs_Box_MiddleCenter_BtnMargin_White.margin = GUI.skin.button.margin; _gs_Box_MiddleCenter_BtnMargin_White.normal.textColor = Color.white; _gs_Box_MiddleCenter_BtnMargin_White2Cyan = new GUIStyle(GUI.skin.box); _gs_Box_MiddleCenter_BtnMargin_White2Cyan.alignment = TextAnchor.MiddleCenter; _gs_Box_MiddleCenter_BtnMargin_White2Cyan.margin = GUI.skin.button.margin; _gs_Box_MiddleCenter_BtnMargin_White2Cyan.normal.textColor = !EditorGUIUtility.isProSkin ? Color.white : Color.cyan; _gs_Box_MiddleCenter_BtnMargin_White2Black = new GUIStyle(GUI.skin.box); _gs_Box_MiddleCenter_BtnMargin_White2Black.alignment = TextAnchor.MiddleCenter; _gs_Box_MiddleCenter_BtnMargin_White2Black.margin = GUI.skin.button.margin; _gs_Box_MiddleCenter_BtnMargin_White2Black.normal.textColor = !EditorGUIUtility.isProSkin ? Color.white : Color.black; _gs_Box_MiddleLeft_BtnMargin_White2Black = new GUIStyle(GUI.skin.box); _gs_Box_MiddleLeft_BtnMargin_White2Black.alignment = TextAnchor.MiddleLeft; _gs_Box_MiddleLeft_BtnMargin_White2Black.margin = GUI.skin.button.margin; _gs_Box_MiddleLeft_BtnMargin_White2Black.normal.textColor = !EditorGUIUtility.isProSkin ? Color.white : Color.black; _gs_Box_MiddleCenter_BoxTextColor = new GUIStyle(GUI.skin.box); _gs_Box_MiddleCenter_BoxTextColor.alignment = TextAnchor.MiddleCenter; _gs_Box_MiddleCenter_BoxTextColor.normal.textColor = apEditorUtil.BoxTextColor; _gs_Box_MiddleCenter_LabelMargin_WhiteColor = new GUIStyle(GUI.skin.box); _gs_Box_MiddleCenter_LabelMargin_WhiteColor.alignment = TextAnchor.MiddleCenter; _gs_Box_MiddleCenter_LabelMargin_WhiteColor.margin = GUI.skin.label.margin; _gs_Box_MiddleCenter_LabelMargin_WhiteColor.normal.textColor = Color.white; _gs_Box_UpperCenter_WhiteColor = new GUIStyle(GUI.skin.box); _gs_Box_UpperCenter_WhiteColor.alignment = TextAnchor.UpperCenter; _gs_Box_UpperCenter_WhiteColor.normal.textColor = Color.white; _gs_TextField_BtnMargin = new GUIStyle(GUI.skin.textField); _gs_TextField_BtnMargin.margin = GUI.skin.button.margin; _gs_TextField_MiddleLeft = new GUIStyle(GUI.skin.textField); _gs_TextField_MiddleLeft.alignment = TextAnchor.MiddleLeft; _isInitialized = true; s_instance = this; }