コード例 #1
0
        public LogDataViewer()
        {
            this.SetWidth(100, LengthUnit.Percent);
            this.SetHeight(VIEWER_HEIGHT);
            this.SetColumn();

            var container = new VisualElement();

            container.SetRow();
            container.ExpandWidthAndHeight();
            Add(container);

            m_FlagViewer = new LogFlagViewer();
            m_FlagViewer.SetWidth(VIEWER_HEIGHT);
            m_FlagViewer.SetHeight(VIEWER_HEIGHT);
            container.Add(m_FlagViewer);

            m_DatetimeLabel = new Label();
            m_DatetimeLabel.SetWidth(220);
            m_DatetimeLabel.SetTextAlign(TextAnchor.MiddleCenter);
            m_DatetimeLabel.SetFontSize(18, LengthUnit.Pixel);
            container.Add(m_DatetimeLabel);

            m_TagLabel = new Label();
            m_TagLabel.SetWidth(80);
            m_TagLabel.SetTextAlign(TextAnchor.MiddleCenter);
            m_TagLabel.SetFontSize(18);
            m_TagLabel.SetFontStyle(FontStyle.Bold);
            container.Add(m_TagLabel);

            m_MessageText            = new TextField();
            m_MessageText.label      = null;
            m_MessageText.isReadOnly = true;
            m_MessageText.SetWidth(100, LengthUnit.Percent);
            container.Add(m_MessageText);

            VisualElement hLine = new VisualElement();

            hLine.SetMargin(2, LengthUnit.Pixel);
            hLine.SetHeight(2);
            hLine.SetWidth(100, LengthUnit.Percent);
            hLine.SetBackgroundColor(Color.grey);
            Add(hLine);
        }