void DrawTab() { bool bIsActive = IsActive; Screen.DrawBox(bIsActive ? mNotebook.Style.ActiveTab : mNotebook.Style.Tab, LayoutRect, mNotebook.Style.TabCornerSize, Color.White); if (mNotebook.HoveredTab == this && !bIsActive) { if (Screen.IsActive) { Screen.DrawBox(Screen.Style.ButtonHoverOverlay, LayoutRect, mNotebook.Style.TabCornerSize, Color.White); } } if (IsUnread) { Screen.DrawBox(mNotebook.Style.UnreadTabMarker, LayoutRect, mNotebook.Style.TabCornerSize, Color.White); } if (Screen.IsActive && HasFocus) { Screen.DrawBox(bIsActive ? mNotebook.Style.ActiveTabFocus : mNotebook.Style.TabFocus, LayoutRect, mNotebook.Style.TabCornerSize, Color.White); } mLabel.Draw(); mIcon.Draw(); if (IsClosable) { mCloseButton.Draw(); } }
//---------------------------------------------------------------------- public override void Draw() { if (Frame != null) { Screen.DrawBox(Frame, LayoutRect, FrameCornerSize, Color.White); } if (mImage.Texture != null) { mImage.Draw(); } mLabel.Draw(); }
//---------------------------------------------------------------------- public override void Draw() { Texture2D frame = (!mbIsPressed) ? Style.Frame : Style.DownFrame; if (frame != null) { Screen.DrawBox(frame, LayoutRect, Style.CornerSize, Color.White); } Rectangle marginRect = new Rectangle(LayoutRect.X + Margin.Left, LayoutRect.Y + Margin.Top, LayoutRect.Width - Margin.Left - Margin.Right, LayoutRect.Height - Margin.Top - Margin.Bottom); if (mbIsHovered && !mbIsPressed && mPressedAnim.IsOver) { if (Screen.IsActive && Style.HoverOverlay != null) { Screen.DrawBox(Style.HoverOverlay, marginRect, Style.CornerSize, Color.White); } } else if (mPressedAnim.CurrentValue > 0f) { if (Style.DownOverlay != null) { Screen.DrawBox(Style.DownOverlay, marginRect, Style.CornerSize, Color.White * mPressedAnim.CurrentValue); } } if (Screen.IsActive && HasFocus && !mbIsPressed) { if (Style.FocusOverlay != null) { Screen.DrawBox(Style.FocusOverlay, marginRect, Style.CornerSize, Color.White); } } mLabel.Draw(); mIcon.Draw(); }
internal void Draw() { mLabel.Draw(); }