Exemplo n.º 1
0
        internal void OnGUI()
        {
            if (Event.current.type == EventType.Layout)
            {
                return;
            }
            if (AnnotationWindow.m_Styles == null)
            {
                AnnotationWindow.m_Styles = new AnnotationWindow.Styles();
            }
            if (this.m_SyncWithState)
            {
                this.SyncToState();
            }
            float topSectionHeight = this.GetTopSectionHeight();

            this.DrawTopSection(topSectionHeight);
            this.DrawAnnotationList(topSectionHeight, this.position.height - topSectionHeight);
            GUI.Label(new Rect(0.0f, 0.0f, this.position.width, this.position.height), GUIContent.none, AnnotationWindow.m_Styles.background);
            if (Event.current.type != EventType.KeyDown || Event.current.keyCode != KeyCode.Escape)
            {
                return;
            }
            this.Cancel();
        }
Exemplo n.º 2
0
        internal void OnGUI()
        {
            if (AnnotationWindow.m_Styles == null)
            {
                AnnotationWindow.m_Styles = new AnnotationWindow.Styles();
            }
            if (this.m_SyncWithState)
            {
                this.SyncToState();
            }
            float topSectionHeight = this.GetTopSectionHeight();

            this.DrawTopSection(topSectionHeight);
            this.DrawAnnotationList(topSectionHeight, base.position.height - topSectionHeight);
            if (Event.current.type == EventType.Repaint)
            {
                AnnotationWindow.m_Styles.background.Draw(new Rect(0f, 0f, base.position.width, base.position.height), GUIContent.none, false, false, false, false);
            }
            if (Event.current.type == EventType.KeyDown && Event.current.keyCode == KeyCode.Escape)
            {
                this.Cancel();
            }
        }
Exemplo n.º 3
0
		internal void OnGUI()
		{
			if (Event.current.type == EventType.Layout)
			{
				return;
			}
			if (AnnotationWindow.m_Styles == null)
			{
				AnnotationWindow.m_Styles = new AnnotationWindow.Styles();
			}
			if (this.m_SyncWithState)
			{
				this.SyncToState();
			}
			float topSectionHeight = this.GetTopSectionHeight();
			this.DrawTopSection(topSectionHeight);
			this.DrawAnnotationList(topSectionHeight, base.position.height - topSectionHeight);
			GUI.Label(new Rect(0f, 0f, base.position.width, base.position.height), GUIContent.none, AnnotationWindow.m_Styles.background);
			if (Event.current.type == EventType.KeyDown && Event.current.keyCode == KeyCode.Escape)
			{
				this.Cancel();
			}
		}