public InspectorPrefsUI(InspectorPrefs prefs) { this.prefs = prefs; this.serialized = new SerializedObject(prefs); styleSheets.Add(styleSheet); if (!FluentUITK.isProSkin) { styleSheets.Add(stylesLight); } ui = this.Fluent(); ui.OnChange <bool>(OnChange); optionsPanel = CreateOptionsPanel(); patchesPanel = new InspectorPatchesUI(); var scrollView = new ScrollView().Fluent().Shrink(-100).Add( optionsPanel, patchesPanel ); ui.Add( CreateTopPanel(), scrollView ); ui.Bind(serialized); }
public override void OnActivate(string searchContext, VisualElement root) { var window = (EditorWindow)settingsWindowInfo.GetValue(this); window.SetAntiAliasing(8); var prefs = InspectorPrefs.LoadFromUserData(); var ui = new InspectorPrefsUI(prefs); root.Add(CreateBigTitle()); root.Add(ui); }