public void DrawToolbar() { if (Screen.width < minWidth) { scale = (float)Screen.width / minWidth; } else { scale = 1f; } SplineEditorGUI.SetScale(scale); DreamteckEditorGUI.SetScale(scale); mouseHoversToolbar = false; minWidth = 770; if (InMirrorMode()) { Mirror(Mathf.RoundToInt(44 * scale)); } else if (InMergeMode()) { Merge(Mathf.RoundToInt(44 * scale)); } else { switch (tool) { case PointTool.Create: if (computer.is2D) { Create2DToolbar(Mathf.RoundToInt(44 * scale)); } else { CreateToolbar(Mathf.RoundToInt(44 * scale)); } break; case PointTool.NormalEdit: Normals(Mathf.RoundToInt(44 * scale)); break; case PointTool.Move: Translate(Mathf.RoundToInt(44 * scale)); break; case PointTool.Scale: Scale(Mathf.RoundToInt(44 * scale)); break; case PointTool.Rotate: Rotate(Mathf.RoundToInt(44 * scale)); break; } } Main(); }
public void Draw() { if (Screen.width < minWidth) { scale = (float)Screen.width / minWidth; } else { scale = 1f; } SplineEditorGUI.SetScale(scale); SplineEditorGUI.scale = scale; mouseHovers = false; minWidth = 610; if (editor.InMirrorMode()) { Mirror(Mathf.RoundToInt(44 * scale)); } else if (editor.InMergeMode()) { Merge(Mathf.RoundToInt(44 * scale)); } else { if (editor.tool == SplineEditor.PointTool.Create) { Create(Mathf.RoundToInt(44 * scale)); } if (editor.tool == SplineEditor.PointTool.NormalEdit) { Normals(Mathf.RoundToInt(44 * scale)); } if (editor.tool == SplineEditor.PointTool.Scale) { Scale(Mathf.RoundToInt(44 * scale)); } if (editor.tool == SplineEditor.PointTool.Rotate) { Rotate(Mathf.RoundToInt(44 * scale)); } } Main(); }