public void DrawToolbar() { if (Screen.width < minWidth) { scale = (float)Screen.width / minWidth; } else { scale = 1f; } SplineEditorGUI.SetScale(scale); DreamteckEditorGUI.SetScale(scale); 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 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(); }