Beispiel #1
0
        public override void Draw(SO_BuiltUi styles)
        {
            string text = _fnGetStringCurrently.GetFromSubject(Subject);
            var    hash = text.GetHashCode();

            if (hash != lastHash)
            {
                lastHash    = hash;
                scrollPos.y = Mathf.Infinity;
            }

            var content = new GUIContent(_fnGetStringCurrently.GetFromSubject(Subject));

            var monoFont  = _s.STYLE_EditArea.font;
            var codeStyle = styles.TextEdit.TextEnter.Style;

            codeStyle.font = monoFont;

            scrollPos = GUILayout.BeginScrollView(scrollPos);
            GUILayout.BeginHorizontal(styles.TextEdit.NameBoxPanel.Style);
            GUILayout.Label(string.Join("\n", _fnGetLineNumberCurrently.GetFromSubject(Subject)), codeStyle, GUILayout.ExpandWidth(false));

            GUI.SetNextControlName("CodeDisplayArea");
            GUILayout.TextArea(text, codeStyle, GUILayout.ExpandWidth(true));

            GUILayout.EndHorizontal();
            GUILayout.EndScrollView();
        }
Beispiel #2
0
        public override void Draw(SO_BuiltUi styles)
        {
            foreach (var ev in events)
            {
                ev(new TimeStep(Time.deltaTime));
            }

            base.Draw(styles);
        }