/// <summary> /// Draw a texture which displays path _so.Collection.Points and their info /// </summary> private void DrawTextureInfo(int _pathIndex, int _pointIndex, Vector3 _position) { EditorStatics.CalculateFontSizes(_position); if (EditorStatics.GetDistance(_position) > 200) { return; } EditorStatics.SetGUIStyleTextureBackground(_position, 340, 220, 1000, 50); EditorStatics.TextureContent = new GUIContent( "<b><color=magenta><size=" + EditorStatics.FontSizeH0 + "> " + EditorStatics.StringPointMark + "Path Point: " + _pointIndex + "\r\n</size></color></b>" + "<color=white><size=" + EditorStatics.FontSizeH3 + "><b> " + EditorStatics.StringPointMark + "Path:</b> " + _pathIndex + "\r\n</size></color>" + "<color=white><size=" + EditorStatics.FontSizeH3 + "><b> " + EditorStatics.StringPointMark + "Position:</b> " + _position + "\r\n</size></color>" ); Handles.Label(_position + gizmoPathPointOffset, EditorStatics.TextureContent, EditorStatics.Style); }
/// <summary> /// Draw a texture which displays _so.Collection.Points and its info /// </summary> private void DrawTextureInfo(int _index, Vector3 _position) { EditorStatics.CalculateFontSizes(_position); if (EditorStatics.GetDistance(_position) > 250) { return; } int _multiplier = 2; EditorStatics.SetGUIStyleTextureBackground(_position, 320, 140 * _multiplier, 1000, 5000); pointContentString = string.Format( "\n<b><color=white><size={0}> {1}Spawn Point: {2}\r\n</size></color></b><color=white><size={3}><b> position:</b> {4} \r\n\n</size></color>", EditorStatics.FontSizeH0, EditorStatics.StringPointMark, _index, EditorStatics.FontSizeH3, _position ); int _count = so.Collection.Points[_index].Paths.Count; for (int _i = 0; _i < _count; _i++) { string _extra = string.Format( "<color=grey><size={0}><b> {1}Path:</b> " + _i + " \n</size></color><color=white><size={2}><b>\t{1}Path Points:</b> {3} \n\n</size></color>", EditorStatics.FontSizeH1, EditorStatics.StringPointMark, EditorStatics.FontSizeH3, GetPathPointCount(_index, _i) ); pointContentString += _extra; } EditorStatics.TextureContent = new GUIContent(pointContentString); Handles.Label(_position + gizmoSpawnPointOffset, EditorStatics.TextureContent, EditorStatics.Style); }