From f5602a0e1414af42cf03cba6a913983692205e88 Mon Sep 17 00:00:00 2001 From: David Gileadi Date: Fri, 1 Sep 2017 17:39:32 -0700 Subject: [PATCH] Use button colors, improve initial render --- Editor/UIExtensionsMenuOptions.cs | 8 +++++-- Scripts/Controls/Segment.cs | 31 +++++++++++++++------------- Scripts/Controls/SegmentedControl.cs | 11 ---------- 3 files changed, 23 insertions(+), 27 deletions(-) diff --git a/Editor/UIExtensionsMenuOptions.cs b/Editor/UIExtensionsMenuOptions.cs index 310a0bf..57af6ec 100644 --- a/Editor/UIExtensionsMenuOptions.cs +++ b/Editor/UIExtensionsMenuOptions.cs @@ -1660,14 +1660,18 @@ namespace UnityEditor.UI SegmentedControl control = go.AddComponent(); Color selectedColor = new Color(0f, 0.455f, 0.894f); - control.selectedColor = selectedColor; var labels = new string[] { "This", "That", "Other" }; for (int i = 0; i < 3; i++) { - var button = AddButtonAsChild(go); + var button = AddButtonAsChild(go).GetComponent