增加Symbol选择Custom类型时的Warning提示

This commit is contained in:
monitor1394
2023-05-04 07:57:04 +08:00
parent 36d629b29a
commit fdd686b038
5 changed files with 14 additions and 4 deletions

View File

@@ -73,6 +73,14 @@ namespace XCharts.Editor
return prop.propertyPath + "_" + index;
}
protected void AddHelpBox(string message, MessageType type = MessageType.Warning, int line = 2)
{
var offset = EditorGUI.indentLevel * ChartEditorHelper.INDENT_WIDTH;
EditorGUI.HelpBox(new Rect(m_DrawRect.x + offset, m_DrawRect.y, m_DrawRect.width - offset, EditorGUIUtility.singleLineHeight * line), message, type);
for (int i = 0; i < line; i++)
AddSingleLineHeight();
}
protected void AddSingleLineHeight()
{
m_Heights[m_KeyName] += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;