void OnGUI() { if (!model.enable) { model.enable = ToggleLeft("Log", model.enable); return; } instance = this; // TODO: why do this here? BeginHorizontal(); if (GL.Button("˂", GL.ExpandWidth(false))) { model.SelectPreviousFrame(); SceneView.RepaintAll(); } GL.Button(frameNo, GL.MaxWidth(48f)); if (GL.Button("˃", GL.ExpandWidth(false))) { model.SelectNextFrame(); SceneView.RepaintAll(); } GL.FlexibleSpace(); EndHorizontal(); // scroll = BeginScrollView(scroll); GUI.backgroundColor = Color.black; var style = GUI.skin.textArea; var f = font; if (f == null) { Debug.LogError("font not available"); } style.font = f; style.fontSize = FontSize; style.normal.textColor = Color.white * 0.9f; style.focused.textColor = Color.white; style.focused.textColor = Color.white; GL.TextArea(model.output, GL.ExpandHeight(true)); EndScrollView(); // GUI.backgroundColor = Color.white; // var w30 = GL.MaxWidth(30f); BeginHorizontal(); model.enable = ToggleLeft($"Log", model.enable, GL.MaxWidth(60)); model.trails = ToggleLeft("Trails", model.trails, GL.MaxWidth(50)); GL.Label("Offset: ", GL.ExpandWidth(false)); var rs = model.renderSettings; rs.offset = FloatField(model.renderSettings.offset, w30); GL.Label("Size: ", w30); rs.size = FloatField(rs.size, w30); GL.Label("Col: ", w30); rs.color = EditorGUILayout.ColorField(rs.color); EndHorizontal(); }
static void Init() { instance = (LogTreeWindow)EditorWindow .GetWindow <LogTreeWindow>(title: "Log-Tree"); instance.Show(); }